[PATCH] x86: BUILD_IRQ say .text to avoid .data.percpu
From: Hugh Dickins
Date: Mon Jul 21 2008 - 13:41:49 EST
When I edit the x86_64 Makefile to -fno-unit-at-a-time, bootup panics
on 0xCCs in IRQ0x3e_interrupt(): IRQ0x20_interrupt etc. have got linked
into .data.percpu. Perhaps there are other ways of triggering that:
specify ".text" in the BUILD_IRQ() macro for safety.
Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
---
I've been using -fno-unit-at-a-time (to lessen inlining, for easier
debugging) for a long time, but never saw this until Mike's percpu mods
came in: I mention this so you're on the lookout, just in case other
things are more likely to go into the wrong section now. (I did give
Mike a private headsup on this a couple of weeks ago, in case it helped
with problems he was having with percpu, but in fact it didn't help.)
arch/x86/kernel/irqinit_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 2.6.26-git/arch/x86/kernel/irqinit_64.c 2008-07-18 11:33:31.000000000 +0100
+++ linux/arch/x86/kernel/irqinit_64.c 2008-07-18 16:07:00.000000000 +0100
@@ -43,7 +43,7 @@
#define BUILD_IRQ(nr) \
asmlinkage void IRQ_NAME(nr); \
- asm("\n.p2align\n" \
+ asm("\n.text\n.p2align\n" \
"IRQ" #nr "_interrupt:\n\t" \
"push $~(" #nr ") ; " \
"jmp common_interrupt");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/