From: Andi Kleen Date: Thu, 6 Sep 2007 14:59:52 +0000 (+0200) Subject: x86_64: Remove CLFLUSH in text_poke() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a534b679180025aa324ebd63c05516e478551cfd;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git x86_64: Remove CLFLUSH in text_poke() 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 Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 9f4ac8b02de..bd72d94e713 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c @@ -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. */ }