jump label: Add _ASM_ALIGN for x86 and x86_64
authorJason Baron <jbaron@redhat.com>
Wed, 16 Mar 2011 19:58:27 +0000 (15:58 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 4 Apr 2011 17:42:51 +0000 (13:42 -0400)
The linker should not be adding holes to word size aligned pointers, but
out of paranoia we are explicitly specifying that alignment. I have not
seen any holes in the jump label section in practice.

Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <e119fbd060c9452c56063ea6148ba1070e7434cc.1300299760.git.jbaron@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/include/asm/jump_label.h

index f217cee8653329f88b666aa61c0266abaa3d25f0..a32b18ce6eadae461d712a6c49b172387cdbbfd1 100644 (file)
@@ -16,6 +16,7 @@ static __always_inline bool arch_static_branch(struct jump_label_key *key)
        asm goto("1:"
                JUMP_LABEL_INITIAL_NOP
                ".pushsection __jump_table,  \"aw\" \n\t"
+               _ASM_ALIGN "\n\t"
                _ASM_PTR "1b, %l[l_yes], %c0 \n\t"
                ".popsection \n\t"
                : :  "i" (key) : : l_yes);