jump label: Introduce static_branch() interface
[deliverable/linux.git] / arch / x86 / kernel / alternative.c
index 7038b95d363f267eba1c7ccb13e8d3f382892837..651454b0c8110a08ac493e1976c7621598b8d7f7 100644 (file)
@@ -199,7 +199,7 @@ void *text_poke_early(void *addr, const void *opcode, size_t len);
 
 /* Replace instructions with better alternatives for this CPU type.
    This runs before SMP is initialized to avoid SMP problems with
-   self modifying code. This implies that assymetric systems where
+   self modifying code. This implies that asymmetric systems where
    APs have less capabilities than the boot processor are not handled.
    Tough. Make sure you disable such features by hand. */
 
@@ -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;
 }
 
@@ -674,7 +679,7 @@ void __kprobes text_poke_smp_batch(struct text_poke_param *params, int n)
        __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
 }
 
-#if defined(CONFIG_DYNAMIC_FTRACE) || defined(HAVE_JUMP_LABEL)
+#if defined(CONFIG_DYNAMIC_FTRACE) || defined(CONFIG_JUMP_LABEL)
 
 #ifdef CONFIG_X86_64
 unsigned char ideal_nop5[5] = { 0x66, 0x66, 0x66, 0x66, 0x90 };
This page took 0.024416 seconds and 5 git commands to generate.