summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-19 18:50:28 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-05-19 18:50:28 -0700
commitf69ca779b93bdd43f4351484bed292b49ab780fc (patch)
tree6592725676007e859745a4197b4009ed12a89a8e
parent03c1e206a2232b21c43825389b4493a06200ca2f (diff)
[PATCH] apply_alternatives() fix
From: Andi Kleen <ak@suse.de> There is some assembly code in setup.c which doesn't explicitly set its section. It comes after a C function which is marked __init. The compiler does not reset the section after such C functions. The assembly code is going into .text.init. That's the wrong section. We get oopses modprobing sctp and, with Manfred's unmap-free-pages debug patch we get oopses modprobing e100.ko. In apply_alternatives().
-rw-r--r--arch/i386/kernel/setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 04e5cb9f1996..cbcd51ed99ba 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -799,13 +799,13 @@ static void __init register_memory(unsigned long max_low_pfn)
/* Use inline assembly to define this because the nops are defined
as inline assembly strings in the include files and we cannot
get them easily into strings. */
-asm("intelnops: "
+asm("\t.data\nintelnops: "
GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
GENERIC_NOP7 GENERIC_NOP8);
-asm("k8nops: "
+asm("\t.data\nk8nops: "
K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
K8_NOP7 K8_NOP8);
-asm("k7nops: "
+asm("\t.data\nk7nops: "
K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
K7_NOP7 K7_NOP8);