Blob Blame History Raw
From: jbeulich@novell.com
Subject: fix placement of some routines/data
Patch-mainline: obsolete

--- head.orig/drivers/xen/core/cpu_hotplug.c	2012-02-10 09:47:12.000000000 +0100
+++ head/drivers/xen/core/cpu_hotplug.c	2012-02-10 11:56:16.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 device *dev)
+static void __cpuinit vcpu_hotplug(unsigned int cpu, struct 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.orig/drivers/xen/core/gnttab.c	2012-05-23 13:46:56.000000000 +0200
+++ head/drivers/xen/core/gnttab.c	2012-05-23 13:47:43.000000000 +0200
@@ -894,7 +894,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, ret;
 	unsigned int max_nr_glist_frames, nr_glist_frames;
--- head.orig/drivers/xen/pcifront/pci_op.c	2012-04-13 16:45:40.000000000 +0200
+++ head/drivers/xen/pcifront/pci_op.c	2012-04-04 13:33:29.000000000 +0200
@@ -407,7 +407,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;