]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86_64: Remove CLFLUSH in text_poke()
authorAndi Kleen <ak@suse.de>
Thu, 6 Sep 2007 14:59:52 +0000 (16:59 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Sep 2007 01:57:47 +0000 (18:57 -0700)
The CLFLUSH for the modified code line in text_poke was supposed
to speed up CPU recovery. Unfortunately it seems to cause hangs
on some VIA C3s (at least on VIA Esther Model 10 Stepping 9)
Remove it.

Thanks to Stefan Becker for reporting/testing.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/alternative.c

index 9f4ac8b02de407f756bf69e7756ac5422f5cb0a7..bd72d94e713e68d75a902b725424c27bb9d39421 100644 (file)
@@ -445,8 +445,6 @@ void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
 {
        memcpy(addr, opcode, len);
        sync_core();
-       /* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline
-          case. */
-       if (cpu_has_clflush)
-               asm("clflush (%0) " :: "r" (addr) : "memory");
+       /* Could also do a CLFLUSH here to speed up CPU recovery; but
+          that causes hangs on some VIA CPUs. */
 }