From: jbeulich@novell.com Subject: fix placement of some routines/data Patch-mainline: obsolete --- sle11-2009-05-14.orig/arch/x86/kernel/e820-xen.c 2009-05-06 10:29:07.000000000 +0200 +++ sle11-2009-05-14/arch/x86/kernel/e820-xen.c 2009-02-17 14:01:20.000000000 +0100 @@ -42,7 +42,7 @@ * user can e.g. boot the original kernel with mem=1G while still booting the * next kernel with full memory. */ -struct e820map e820; +struct e820map __initdata e820; #ifndef CONFIG_XEN struct e820map e820_saved; #else --- sle11-2009-05-14.orig/arch/x86/kernel/process_32-xen.c 2008-10-01 16:20:58.000000000 +0200 +++ sle11-2009-05-14/arch/x86/kernel/process_32-xen.c 2008-12-01 12:07:15.000000000 +0100 @@ -99,7 +99,7 @@ static void cpu_exit_clear(void) } #endif -static inline void play_dead(void) +static void __ref play_dead(void) { idle_task_exit(); local_irq_disable(); --- sle11-2009-05-14.orig/arch/x86/kernel/process_64-xen.c 2008-10-01 16:20:58.000000000 +0200 +++ sle11-2009-05-14/arch/x86/kernel/process_64-xen.c 2008-12-01 12:07:15.000000000 +0100 @@ -95,7 +95,7 @@ void exit_idle(void) } #ifdef CONFIG_HOTPLUG_CPU -static inline void play_dead(void) +static void __ref play_dead(void) { idle_task_exit(); #ifndef CONFIG_XEN --- sle11-2009-05-14.orig/arch/x86/kernel/time_32-xen.c 2009-03-24 10:13:50.000000000 +0100 +++ sle11-2009-05-14/arch/x86/kernel/time_32-xen.c 2009-03-24 10:22:14.000000000 +0100 @@ -702,7 +702,7 @@ int xen_update_persistent_clock(void) /* Dynamically-mapped IRQ. */ DEFINE_PER_CPU(int, timer_irq); -static void setup_cpu0_timer_irq(void) +static void __init setup_cpu0_timer_irq(void) { per_cpu(timer_irq, 0) = bind_virq_to_irqhandler( @@ -913,7 +913,7 @@ int __cpuinit local_setup_timer(unsigned return 0; } -void __cpuexit local_teardown_timer(unsigned int cpu) +void __cpuinit local_teardown_timer(unsigned int cpu) { BUG_ON(cpu == 0); unbind_from_irqhandler(per_cpu(timer_irq, cpu), NULL); --- sle11-2009-05-14.orig/arch/x86/mm/ioremap-xen.c 2009-01-16 10:45:51.000000000 +0100 +++ sle11-2009-05-14/arch/x86/mm/ioremap-xen.c 2009-01-07 10:55:24.000000000 +0100 @@ -201,7 +201,8 @@ int touch_pte_range(struct mm_struct *mm EXPORT_SYMBOL(touch_pte_range); -int page_is_ram(unsigned long pagenr) +#ifdef CONFIG_X86_32 +int __init page_is_ram(unsigned long pagenr) { resource_size_t addr, end; int i; @@ -239,6 +240,7 @@ int page_is_ram(unsigned long pagenr) } return 0; } +#endif /* * Fix up the linear direct mapping of the kernel to avoid cache attribute --- sle11-2009-05-14.orig/drivers/xen/core/cpu_hotplug.c 2009-05-14 10:56:29.000000000 +0200 +++ sle11-2009-05-14/drivers/xen/core/cpu_hotplug.c 2008-12-01 12:07:15.000000000 +0100 @@ -24,7 +24,7 @@ static int local_cpu_hotplug_request(voi return (current->mm != NULL); } -static void vcpu_hotplug(unsigned int cpu) +static void __cpuinit vcpu_hotplug(unsigned int cpu) { int err; char dir[32], state[32]; @@ -51,7 +51,7 @@ static void vcpu_hotplug(unsigned int cp } } -static void handle_vcpu_hotplug_event( +static void __cpuinit handle_vcpu_hotplug_event( struct xenbus_watch *watch, const char **vec, unsigned int len) { unsigned int cpu; @@ -80,12 +80,12 @@ static int smpboot_cpu_notify(struct not return NOTIFY_OK; } -static int setup_cpu_watcher(struct notifier_block *notifier, - unsigned long event, void *data) +static int __cpuinit setup_cpu_watcher(struct notifier_block *notifier, + unsigned long event, void *data) { unsigned int i; - static struct xenbus_watch cpu_watch = { + static struct xenbus_watch __cpuinitdata cpu_watch = { .node = "cpu", .callback = handle_vcpu_hotplug_event, .flags = XBWF_new_thread }; @@ -105,7 +105,7 @@ static int __init setup_vcpu_hotplug_eve { static struct notifier_block hotplug_cpu = { .notifier_call = smpboot_cpu_notify }; - static struct notifier_block xsn_cpu = { + static struct notifier_block __cpuinitdata xsn_cpu = { .notifier_call = setup_cpu_watcher }; if (!is_running_on_xen()) @@ -119,7 +119,7 @@ static int __init setup_vcpu_hotplug_eve arch_initcall(setup_vcpu_hotplug_event); -int smp_suspend(void) +int __ref smp_suspend(void) { unsigned int cpu; int err; @@ -140,7 +140,7 @@ int smp_suspend(void) return 0; } -void smp_resume(void) +void __ref smp_resume(void) { unsigned int cpu; --- sle11-2009-05-14.orig/drivers/xen/core/smpboot.c 2009-03-16 16:38:16.000000000 +0100 +++ sle11-2009-05-14/drivers/xen/core/smpboot.c 2008-12-01 12:07:15.000000000 +0100 @@ -168,7 +168,7 @@ static int __cpuinit xen_smp_intr_init(u } #ifdef CONFIG_HOTPLUG_CPU -static void __cpuexit xen_smp_intr_exit(unsigned int cpu) +static void __cpuinit xen_smp_intr_exit(unsigned int cpu) { if (cpu != 0) local_teardown_timer(cpu); @@ -387,7 +387,7 @@ int __cpuexit __cpu_disable(void) return 0; } -void __cpuexit __cpu_die(unsigned int cpu) +void __cpuinit __cpu_die(unsigned int cpu) { while (HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL)) { current->state = TASK_UNINTERRUPTIBLE;