Re: About Celeron processor memory barrier problem

From: Pavel Machek (pavel@suse.cz)
Date: Sat Dec 23 2000 - 17:34:48 EST


Hi!

> diff -Nur linux/include/asm-i386/system.h linux.new/include/asm-i386/system.h
> --- linux/include/asm-i386/system.h Mon Dec 11 19:26:39 2000
> +++ linux.new/include/asm-i386/system.h Sat Dec 23 16:06:01 2000
> @@ -274,7 +274,14 @@
> #ifndef CONFIG_X86_XMM
> #define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
> #else
> -#define mb() __asm__ __volatile__ ("sfence": : :"memory")
> +#define mb() do { \
> + if ( cpu_has_xmm ) { \
                ~~~~~~~~~~~~~~~~~~

Cost of test may well be bigger than gain by using sfence...

Pavel

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Dec 31 2000 - 21:00:07 EST