Commit f69ca779 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[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().
parent 03c1e206
...@@ -799,13 +799,13 @@ static void __init register_memory(unsigned long max_low_pfn) ...@@ -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 /* Use inline assembly to define this because the nops are defined
as inline assembly strings in the include files and we cannot as inline assembly strings in the include files and we cannot
get them easily into strings. */ get them easily into strings. */
asm("intelnops: " asm("\t.data\nintelnops: "
GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
GENERIC_NOP7 GENERIC_NOP8); GENERIC_NOP7 GENERIC_NOP8);
asm("k8nops: " asm("\t.data\nk8nops: "
K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
K8_NOP7 K8_NOP8); K8_NOP7 K8_NOP8);
asm("k7nops: " asm("\t.data\nk7nops: "
K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
K7_NOP7 K7_NOP8); K7_NOP7 K7_NOP8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment