x86: cpuinit-annotate SMP boot trampolines properly
authorJan Beulich <JBeulich@novell.com>
Fri, 4 Sep 2009 08:16:22 +0000 (09:16 +0100)
committerIngo Molnar <mingo@elte.hu>
Sun, 20 Sep 2009 18:23:37 +0000 (20:23 +0200)
Add missing annotations, and make use of include/linux/init.h's
macros.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <4AA0E8F60200007800013703@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/trampoline.c
arch/x86/kernel/trampoline_32.S
arch/x86/kernel/trampoline_64.S

index 808031a5ba19a62bee01b404a812d57409b60b7d..699f7eeb896a15481e08130355c988c6e365190f 100644 (file)
@@ -4,7 +4,7 @@
 #include <asm/e820.h>
 
 /* ready for x86_64 and x86 */
-unsigned char *trampoline_base = __va(TRAMPOLINE_BASE);
+unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE);
 
 void __init reserve_trampoline_memory(void)
 {
@@ -26,7 +26,7 @@ void __init reserve_trampoline_memory(void)
  * bootstrap into the page concerned. The caller
  * has made sure it's suitably aligned.
  */
-unsigned long setup_trampoline(void)
+unsigned long __cpuinit setup_trampoline(void)
 {
        memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
        return virt_to_phys(trampoline_base);
index 66d874e5404cec797dbdab2fae1a84558ecbc50a..8508237e8e43634c6ec70c41302922d301cef512 100644 (file)
  */
 
 #include <linux/linkage.h>
+#include <linux/init.h>
 #include <asm/segment.h>
 #include <asm/page_types.h>
 
 /* We can free up trampoline after bootup if cpu hotplug is not supported. */
-#ifndef CONFIG_HOTPLUG_CPU
-.section ".cpuinit.data","aw",@progbits
-#else
-.section .rodata,"a",@progbits
-#endif
-
+__CPUINITRODATA
 .code16
 
 ENTRY(trampoline_data)
index cddfb8d386b927bce74e8b82e78a23aeaa83c04a..596d54c660a5e63f819b46a06561b2b0ce3fcd90 100644 (file)
  */
 
 #include <linux/linkage.h>
+#include <linux/init.h>
 #include <asm/pgtable_types.h>
 #include <asm/page_types.h>
 #include <asm/msr.h>
 #include <asm/segment.h>
 #include <asm/processor-flags.h>
 
-.section .rodata, "a", @progbits
-
+/* We can free up the trampoline after bootup if cpu hotplug is not supported. */
+__CPUINITRODATA
 .code16
 
 ENTRY(trampoline_data)