]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/alternative.c
x86: stop_machine_text_poke() should issue sync_core()
[karo-tx-linux.git] / arch / x86 / kernel / alternative.c
index 7038b95d363f267eba1c7ccb13e8d3f382892837..4db35544de738f29f33051c444ad40b998c0e3b1 100644 (file)
@@ -620,7 +620,12 @@ static int __kprobes stop_machine_text_poke(void *data)
                flush_icache_range((unsigned long)p->addr,
                                   (unsigned long)p->addr + p->len);
        }
-
+       /*
+        * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
+        * that a core serializing instruction such as "cpuid" should be
+        * executed on _each_ core before the new instruction is made visible.
+        */
+       sync_core();
        return 0;
 }