lkml.org 
[lkml]   [2007]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc][patch 2/3] x86: fix IO write barriers
On Thu, Oct 04, 2007 at 07:22:58AM +0200, Nick Piggin wrote:

> -#ifdef CONFIG_X86_OOSTORE
> -/* Actually there are no OOO store capable CPUs for now that do SSE,
> - but make it already an possibility. */
> -#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
> -#else
> -#define wmb() __asm__ __volatile__ ("": : :"memory")
> -#endif
> -
> #ifdef CONFIG_SMP
> #define smp_mb() mb()
> #define smp_rmb() rmb()
> -#define smp_wmb() wmb()
> +#ifdef CONFIG_X86_OOSTORE
> +# define smp_wmb() wmb()
> +#else
> +# define smp_wmb() barrier()
> +#endif

The only vendor that ever implemented OOSTOREs was Centaur, and they
only did in the Winchip generation of the CPUs. When they dropped it
from the C3, I asked whether they intended to bring it back, and the
answer was "extremely unlikely".

So we can probably just drop that "just in case" clause above, and just
do..

#define smp_wmb() barrier()


Dave

--
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-04 19:35    [W:0.479 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site