]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/60048_xen-sections.patch1
Stop dhcpcd before starting if it was running
[people/pmueller/ipfire-2.x.git] / src / patches / 60048_xen-sections.patch1
CommitLineData
cc90b958
BS
1From: jbeulich@novell.com
2Subject: fix placement of some routines/data
3Patch-mainline: obsolete
4
5Index: head-2008-12-01/arch/x86/kernel/e820-xen.c
6===================================================================
7--- head-2008-12-01.orig/arch/x86/kernel/e820-xen.c 2008-12-01 11:49:07.000000000 +0100
8+++ head-2008-12-01/arch/x86/kernel/e820-xen.c 2008-12-01 12:07:15.000000000 +0100
9@@ -42,7 +42,7 @@
10 * user can e.g. boot the original kernel with mem=1G while still booting the
11 * next kernel with full memory.
12 */
13-struct e820map e820;
14+struct e820map __initdata e820;
15 struct e820map e820_saved;
16 #ifdef CONFIG_XEN
17 static struct e820map machine_e820;
18Index: head-2008-12-01/arch/x86/kernel/process_32-xen.c
19===================================================================
20--- head-2008-12-01.orig/arch/x86/kernel/process_32-xen.c 2008-12-01 12:06:01.000000000 +0100
21+++ head-2008-12-01/arch/x86/kernel/process_32-xen.c 2008-12-01 12:07:15.000000000 +0100
22@@ -99,7 +99,7 @@ static void cpu_exit_clear(void)
23 }
24 #endif
25
26-static inline void play_dead(void)
27+static void __ref play_dead(void)
28 {
29 idle_task_exit();
30 local_irq_disable();
31Index: head-2008-12-01/arch/x86/kernel/process_64-xen.c
32===================================================================
33--- head-2008-12-01.orig/arch/x86/kernel/process_64-xen.c 2008-12-01 12:06:01.000000000 +0100
34+++ head-2008-12-01/arch/x86/kernel/process_64-xen.c 2008-12-01 12:07:15.000000000 +0100
35@@ -95,7 +95,7 @@ void exit_idle(void)
36 }
37
38 #ifdef CONFIG_HOTPLUG_CPU
39-static inline void play_dead(void)
40+static void __ref play_dead(void)
41 {
42 idle_task_exit();
43 #ifndef CONFIG_XEN
44Index: head-2008-12-01/arch/x86/kernel/time_32-xen.c
45===================================================================
46--- head-2008-12-01.orig/arch/x86/kernel/time_32-xen.c 2008-12-01 11:58:30.000000000 +0100
47+++ head-2008-12-01/arch/x86/kernel/time_32-xen.c 2008-12-01 12:07:15.000000000 +0100
48@@ -704,7 +704,7 @@ int xen_update_persistent_clock(void)
49 /* Dynamically-mapped IRQ. */
50 DEFINE_PER_CPU(int, timer_irq);
51
52-static void setup_cpu0_timer_irq(void)
53+static void __init setup_cpu0_timer_irq(void)
54 {
55 per_cpu(timer_irq, 0) =
56 bind_virq_to_irqhandler(
57@@ -915,7 +915,7 @@ int __cpuinit local_setup_timer(unsigned
58 return 0;
59 }
60
61-void __cpuexit local_teardown_timer(unsigned int cpu)
62+void __cpuinit local_teardown_timer(unsigned int cpu)
63 {
64 BUG_ON(cpu == 0);
65 unbind_from_irqhandler(per_cpu(timer_irq, cpu), NULL);
66Index: head-2008-12-01/arch/x86/mm/ioremap-xen.c
67===================================================================
68--- head-2008-12-01.orig/arch/x86/mm/ioremap-xen.c 2008-12-01 12:03:09.000000000 +0100
69+++ head-2008-12-01/arch/x86/mm/ioremap-xen.c 2008-12-01 12:07:15.000000000 +0100
70@@ -201,7 +201,8 @@ int touch_pte_range(struct mm_struct *mm
71
72 EXPORT_SYMBOL(touch_pte_range);
73
74-int page_is_ram(unsigned long pagenr)
75+#ifdef CONFIG_X86_32
76+int __init page_is_ram(unsigned long pagenr)
77 {
78 resource_size_t addr, end;
79 int i;
80@@ -239,6 +240,7 @@ int page_is_ram(unsigned long pagenr)
81 }
82 return 0;
83 }
84+#endif
85
86 /*
87 * Fix up the linear direct mapping of the kernel to avoid cache attribute
88Index: head-2008-12-01/drivers/xen/core/cpu_hotplug.c
89===================================================================
90--- head-2008-12-01.orig/drivers/xen/core/cpu_hotplug.c 2008-01-21 11:15:26.000000000 +0100
91+++ head-2008-12-01/drivers/xen/core/cpu_hotplug.c 2008-12-01 12:07:15.000000000 +0100
92@@ -24,7 +24,7 @@ static int local_cpu_hotplug_request(voi
93 return (current->mm != NULL);
94 }
95
96-static void vcpu_hotplug(unsigned int cpu)
97+static void __cpuinit vcpu_hotplug(unsigned int cpu)
98 {
99 int err;
100 char dir[32], state[32];
101@@ -51,7 +51,7 @@ static void vcpu_hotplug(unsigned int cp
102 }
103 }
104
105-static void handle_vcpu_hotplug_event(
106+static void __cpuinit handle_vcpu_hotplug_event(
107 struct xenbus_watch *watch, const char **vec, unsigned int len)
108 {
109 unsigned int cpu;
110@@ -80,12 +80,12 @@ static int smpboot_cpu_notify(struct not
111 return NOTIFY_OK;
112 }
113
114-static int setup_cpu_watcher(struct notifier_block *notifier,
115- unsigned long event, void *data)
116+static int __cpuinit setup_cpu_watcher(struct notifier_block *notifier,
117+ unsigned long event, void *data)
118 {
119 unsigned int i;
120
121- static struct xenbus_watch cpu_watch = {
122+ static struct xenbus_watch __cpuinitdata cpu_watch = {
123 .node = "cpu",
124 .callback = handle_vcpu_hotplug_event,
125 .flags = XBWF_new_thread };
126@@ -105,7 +105,7 @@ static int __init setup_vcpu_hotplug_eve
127 {
128 static struct notifier_block hotplug_cpu = {
129 .notifier_call = smpboot_cpu_notify };
130- static struct notifier_block xsn_cpu = {
131+ static struct notifier_block __cpuinitdata xsn_cpu = {
132 .notifier_call = setup_cpu_watcher };
133
134 if (!is_running_on_xen())
135@@ -119,7 +119,7 @@ static int __init setup_vcpu_hotplug_eve
136
137 arch_initcall(setup_vcpu_hotplug_event);
138
139-int smp_suspend(void)
140+int __ref smp_suspend(void)
141 {
142 unsigned int cpu;
143 int err;
144@@ -140,7 +140,7 @@ int smp_suspend(void)
145 return 0;
146 }
147
148-void smp_resume(void)
149+void __ref smp_resume(void)
150 {
151 unsigned int cpu;
152
153Index: head-2008-12-01/drivers/xen/core/smpboot.c
154===================================================================
155--- head-2008-12-01.orig/drivers/xen/core/smpboot.c 2008-12-01 11:49:07.000000000 +0100
156+++ head-2008-12-01/drivers/xen/core/smpboot.c 2008-12-01 12:07:15.000000000 +0100
157@@ -176,7 +176,7 @@ static int __cpuinit xen_smp_intr_init(u
158 }
159
160 #ifdef CONFIG_HOTPLUG_CPU
161-static void __cpuexit xen_smp_intr_exit(unsigned int cpu)
162+static void __cpuinit xen_smp_intr_exit(unsigned int cpu)
163 {
164 if (cpu != 0)
165 local_teardown_timer(cpu);
166@@ -395,7 +395,7 @@ int __cpuexit __cpu_disable(void)
167 return 0;
168 }
169
170-void __cpuexit __cpu_die(unsigned int cpu)
171+void __cpuinit __cpu_die(unsigned int cpu)
172 {
173 while (HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL)) {
174 current->state = TASK_UNINTERRUPTIBLE;