Skip to content

Commit

Permalink
jump label: Add _ASM_ALIGN for x86 and x86_64
Browse files Browse the repository at this point in the history
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 <[email protected]>
LKML-Reference: <e119fbd060c9452c56063ea6148ba1070e7434cc.1300299760.git.jbaron@redhat.com>
Acked-by: Peter Zijlstra <[email protected]>
Acked-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
jibaron authored and rostedt committed Apr 4, 2011
1 parent d430d3d commit ef64789
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/include/asm/jump_label.h
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit ef64789

Please sign in to comment.