Re: About Celeron processor memory barrier problem

Pavel Machek
2000-12-24T17:18:00Z

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