x86: fix cpu hotplug on 32bit

commit 3e9704739daf46a8ba6593d749c67b5f7cd633d2 ("x86: boot secondary
cpus through initial_code") causes the kernel to crash when a CPU is
brought online after the read only sections have been write
protected. The write to initial_code in do_boot_cpu() fails.

Move inital_code to .cpuinit.data section.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>

+5 -3
+5 -3
arch/x86/kernel/head_32.S
··· 456 1: 457 #endif /* CONFIG_SMP */ 458 jmp *(initial_code) 459 - .align 4 460 - ENTRY(initial_code) 461 - .long i386_start_kernel 462 463 /* 464 * We depend on ET to be correct. This checks for 287/387. ··· 597 popl %eax 598 #endif 599 iret 600 601 .section .text 602 /*
··· 456 1: 457 #endif /* CONFIG_SMP */ 458 jmp *(initial_code) 459 460 /* 461 * We depend on ET to be correct. This checks for 287/387. ··· 600 popl %eax 601 #endif 602 iret 603 + 604 + .section .cpuinit.data,"wa" 605 + .align 4 606 + ENTRY(initial_code) 607 + .long i386_start_kernel 608 609 .section .text 610 /*