From: jbeulich@novell.com Subject: fix placement of some routines/data Patch-mainline: obsolete --- head-2011-01-22.orig/arch/x86/kernel/time-xen.c 2010-11-22 13:21:13.000000000 +0100 +++ head-2011-01-22/arch/x86/kernel/time-xen.c 2010-09-16 16:49:59.000000000 +0200 @@ -648,7 +648,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( --- head-2011-01-22.orig/drivers/xen/core/cpu_hotplug.c 2011-01-24 12:14:25.000000000 +0100 +++ head-2011-01-22/drivers/xen/core/cpu_hotplug.c 2011-01-24 12:15:51.000000000 +0100 @@ -25,7 +25,7 @@ static int local_cpu_hotplug_request(voi return (current->mm != NULL); } -static void vcpu_hotplug(unsigned int cpu, struct sys_device *dev) +static void __cpuinit vcpu_hotplug(unsigned int cpu, struct sys_device *dev) { int err; char dir[32], state[32]; @@ -54,7 +54,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; @@ -83,12 +83,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 }; @@ -107,7 +107,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()) @@ -121,7 +121,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; @@ -141,7 +141,7 @@ int smp_suspend(void) return 0; } -void smp_resume(void) +void __ref smp_resume(void) { unsigned int cpu; --- head-2011-01-22.orig/drivers/xen/core/gnttab.c 2010-11-22 13:21:03.000000000 +0100 +++ head-2011-01-22/drivers/xen/core/gnttab.c 2011-01-14 15:00:13.000000000 +0100 @@ -794,7 +794,12 @@ static int gnttab_expand(unsigned int re return rc; } -int __devinit gnttab_init(void) +#ifdef CONFIG_XEN +static int __init +#else +int __devinit +#endif +gnttab_init(void) { int i; unsigned int max_nr_glist_frames, nr_glist_frames; --- head-2011-01-22.orig/drivers/xen/pcifront/pci_op.c 2010-11-22 13:10:22.000000000 +0100 +++ head-2011-01-22/drivers/xen/pcifront/pci_op.c 2010-10-04 11:10:07.000000000 +0200 @@ -416,7 +416,7 @@ void pci_frontend_disable_msi(struct pci #endif /* CONFIG_PCI_MSI */ /* Claim resources for the PCI frontend as-is, backend won't allow changes */ -static int pcifront_claim_resource(struct pci_dev *dev, void *data) +static int __devinit pcifront_claim_resource(struct pci_dev *dev, void *data) { struct pcifront_device *pdev = data; int i;