jump_label: Fix unaligned traps on sparc.
Subsystems (2)
David Miller
maintainerPATCH 1/1 jump_label: Fix unaligned traps on sparc.
The vmlinux.lds.h knobs to emit the __jump_table section in the main kernel image takes care to align the section, but this doesn't help for the __jump_table section that gets emitted into modules.
Fix the resulting lack of section alignment by explicitly specifying it in the assembler.
arch/sparc/include/asm/jump_label.h +1 -0
@@ -14,6 +14,7 @@"nop\n\t" \"nop\n\t" \".pushsection __jump_table, \"a\"\n\t" \ +".align 4\n\t" \ ".word 1b, %l[" #label "], %c0\n\t" \ ".popsection \n\t" \ : : "i" (key) : : label);\
Steven Rostedt
reviewerQuoted 8 lines · David Miller
The
vmlinux.lds.hknobs to emit the__jump_tablesection in the main kernel image takes care to align the section, but this doesn't help for the__jump_tablesection that gets emitted into modules.Fix the resulting lack of section alignment by explicitly specifying it in the assembler.
Signed-off-by David S. Miller <[email protected]>
Thanks! I'll pull this in tonight with the other jump label patches.
Unfortunately, it turns out that gcc has a bug that can cause crashes when jump label is used. We need to set it to broken until gcc has a fix and we can detect if the compiler has the bug or not.
-- Steve
Quoted 13 lines
arch/sparc/include/asm/jump_label.h +1
-0@@ -14,6 +14,7 @@"nop\n\t" \"nop\n\t" \".pushsection __jump_table, \"a\"\n\t" \ +".align 4\n\t" \ ".word 1b, %l[" #label "], %c0\n\t" \ ".popsection \n\t" \ : : "i" (key) : : label);\
tip-bot for David Miller
maintainerCommit-ID: f0daed0242d514033b9ecca9187108d3c4e281a5 Gitweb: http://git.kernel.org/tip/f0daed0242d514033b9ecca9187108d3c4e281a5 Author: David Miller <[email protected]> AuthorDate: Sat, 23 Oct 2010 11:06:24 -0700 Committer: Steven Rostedt <[email protected]> CommitDate: Fri, 29 Oct 2010 12:57:06 -0400
jump_label: Fix unaligned traps on sparc.
The vmlinux.lds.h knobs to emit the __jump_table section in the main kernel image takes care to align the section, but this doesn't help for the __jump_table section that gets emitted into modules.
Fix the resulting lack of section alignment by explicitly specifying it in the assembler.
LKML-Reference: <[email protected]>
--- arch/sparc/include/asm/jump_label.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/sparc/include/asm/jump_label.h +1 -0
@@ -14,6 +14,7 @@"nop\n\t" \"nop\n\t" \".pushsection __jump_table, \"a\"\n\t" \ +".align 4\n\t" \ ".word 1b, %l[" #label "], %c0\n\t" \ ".popsection \n\t" \ : : "i" (key) : : label);\