From 700a4acbd9b6c0d22ab17d248cd22e70b8268bfb Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 30 Apr 2003 04:13:50 -0700 Subject: [PATCH] Fix prefetch patching in 2.5-bk Brown paperbag time. I forgot to take the modrm byte in account with the prefetch patch replacement. With 3.2 it worked because it used the right registers in my configuration. But gcc 2.96 uses a different register in __dpath and the prefetch becomes 4 bytes with modrm and the original nop needs to be as long as that too. --- include/asm-i386/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index d69cc46d5866..6bbb21e6e205 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -564,7 +564,7 @@ static inline void rep_nop(void) #define ARCH_HAS_PREFETCH extern inline void prefetch(const void *x) { - alternative_input(ASM_NOP3, + alternative_input(ASM_NOP4, "prefetchnta (%1)", X86_FEATURE_XMM, "r" (x)); @@ -578,7 +578,7 @@ extern inline void prefetch(const void *x) spinlocks to avoid one state transition in the cache coherency protocol. */ extern inline void prefetchw(const void *x) { - alternative_input(ASM_NOP3, + alternative_input(ASM_NOP4, "prefetchw (%1)", X86_FEATURE_3DNOW, "r" (x)); -- cgit v1.2.3