PATCH: make rep-nop a barrier as in 2.5

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 14 Jul 2003 13:32:15 +0100


diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.22-pre5/include/asm-i386/processor.h linux.22-pre5-ac1/include/asm-i386/processor.h
--- linux.22-pre5/include/asm-i386/processor.h 2003-07-14 12:27:42.000000000 +0100
+++ linux.22-pre5-ac1/include/asm-i386/processor.h 2003-07-08 23:31:26.000000000 +0100
@@ -468,7 +471,7 @@
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static inline void rep_nop(void)
{
- __asm__ __volatile__("rep;nop");
+ __asm__ __volatile__("rep;nop" ::: "memory");
}

#define cpu_relax() rep_nop()
-
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/