jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP}
authorPeter Zijlstra <peterz@infradead.org>
Fri, 24 Jul 2015 12:45:44 +0000 (14:45 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 3 Aug 2015 09:34:12 +0000 (11:34 +0200)
Since we've already stepped away from ENABLE is a JMP and DISABLE is a
NOP with the branch_default bits, and are going to make it even worse,
rename it to make it all clearer.

This way we don't mix multiple levels of logic attributes, but have a
plain 'physical' name for what the current instruction patching status
of a jump label is.

This is a first step in removing the naming confusion that has led to
a stream of avoidable bugs such as:

  a833581e372a ("x86, perf: Fix static_key bug in load_mm_cr4()")

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
[ Beefed up the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm/kernel/jump_label.c
arch/arm64/kernel/jump_label.c
arch/mips/kernel/jump_label.c
arch/powerpc/kernel/jump_label.c
arch/s390/kernel/jump_label.c
arch/sparc/kernel/jump_label.c
arch/x86/kernel/jump_label.c
include/linux/jump_label.h
kernel/jump_label.c

index e39cbf4..845a5dd 100644 (file)
@@ -12,7 +12,7 @@ static void __arch_jump_label_transform(struct jump_entry *entry,
        void *addr = (void *)entry->code;
        unsigned int insn;
 
-       if (type == JUMP_LABEL_ENABLE)
+       if (type == JUMP_LABEL_JMP)
                insn = arm_gen_branch(entry->code, entry->target);
        else
                insn = arm_gen_nop();
index 4f1fec7..c2dd1ad 100644 (file)
@@ -28,7 +28,7 @@ void arch_jump_label_transform(struct jump_entry *entry,
        void *addr = (void *)entry->code;
        u32 insn;
 
-       if (type == JUMP_LABEL_ENABLE) {
+       if (type == JUMP_LABEL_JMP) {
                insn = aarch64_insn_gen_branch_imm(entry->code,
                                                   entry->target,
                                                   AARCH64_INSN_BRANCH_NOLINK);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge