Skip to content

Commit

Permalink
x86-64: make BUILD_IRQ() also reset section back
Browse files Browse the repository at this point in the history
Commit 9d25d4d ("x86: BUILD_IRQ say
.text to avoid .data.percpu") added a ".text" specifier to make sure
that BUILD_IRQ() builds the irq trampoline in the text segment rather
than in some random left-over segment that the compiler happened to
leave the asm in.

However, we should also make sure that we switch back by adding a
".previous" at the end, so that there are no subtle issues with
subsequent compiler-generated code.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Jul 24, 2008
1 parent 6044110 commit 6209ed9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/irqinit_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
asm("\n.text\n.p2align\n" \
"IRQ" #nr "_interrupt:\n\t" \
"push $~(" #nr ") ; " \
"jmp common_interrupt");
"jmp common_interrupt\n" \
".previous");

#define BI(x,y) \
BUILD_IRQ(x##y)
Expand Down

0 comments on commit 6209ed9

Please sign in to comment.