aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-07-26 13:36:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 17:35:42 -0400
commit59586e5a262a29361c45c929ea3253d4aec830b0 (patch)
tree1219b4943bc04515973a44c6e3a184e4f6f026f0
parent16dcb4bbda579c4e3d80048b755ac124d8fab21a (diff)
[PATCH] Don't export machine_restart, machine_halt, or machine_power_off.
machine_restart, machine_halt and machine_power_off are machine specific hooks deep into the reboot logic, that modules have no business messing with. Usually code should be calling kernel_restart, kernel_halt, kernel_power_off, or emergency_restart. So don't export machine_restart, machine_halt, and machine_power_off so we can catch buggy users. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/alpha/kernel/process.c3
-rw-r--r--arch/arm/kernel/process.c4
-rw-r--r--arch/arm26/kernel/process.c5
-rw-r--r--arch/cris/kernel/process.c6
-rw-r--r--arch/h8300/kernel/process.c6
-rw-r--r--arch/i386/kernel/reboot.c5
-rw-r--r--arch/i386/mach-visws/reboot.c5
-rw-r--r--arch/i386/mach-voyager/voyager_basic.c5
-rw-r--r--arch/ia64/kernel/process.c5
-rw-r--r--arch/m32r/kernel/process.c6
-rw-r--r--arch/m68k/kernel/process.c6
-rw-r--r--arch/m68knommu/kernel/process.c6
-rw-r--r--arch/mips/kernel/reset.c5
-rw-r--r--arch/parisc/kernel/process.c6
-rw-r--r--arch/ppc/kernel/setup.c6
-rw-r--r--arch/ppc64/kernel/setup.c3
-rw-r--r--arch/s390/kernel/setup.c6
-rw-r--r--arch/sh/kernel/process.c6
-rw-r--r--arch/sparc/kernel/process.c6
-rw-r--r--arch/sparc64/kernel/power.c2
-rw-r--r--arch/sparc64/kernel/process.c4
-rw-r--r--arch/um/kernel/reboot.c6
-rw-r--r--arch/v850/kernel/anna.c6
-rw-r--r--arch/v850/kernel/as85ep1.c6
-rw-r--r--arch/v850/kernel/fpga85e2c.c6
-rw-r--r--arch/v850/kernel/rte_cb.c6
-rw-r--r--arch/v850/kernel/sim.c6
-rw-r--r--arch/v850/kernel/sim85e2.c5
-rw-r--r--arch/x86_64/kernel/reboot.c5
29 files changed, 0 insertions, 152 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 4933f3ce5833..fa98dae3cd98 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -165,7 +165,6 @@ machine_restart(char *restart_cmd)
165 common_shutdown(LINUX_REBOOT_CMD_RESTART, restart_cmd); 165 common_shutdown(LINUX_REBOOT_CMD_RESTART, restart_cmd);
166} 166}
167 167
168EXPORT_SYMBOL(machine_restart);
169 168
170void 169void
171machine_halt(void) 170machine_halt(void)
@@ -173,7 +172,6 @@ machine_halt(void)
173 common_shutdown(LINUX_REBOOT_CMD_HALT, NULL); 172 common_shutdown(LINUX_REBOOT_CMD_HALT, NULL);
174} 173}
175 174
176EXPORT_SYMBOL(machine_halt);
177 175
178void 176void
179machine_power_off(void) 177machine_power_off(void)
@@ -181,7 +179,6 @@ machine_power_off(void)
181 common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL); 179 common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL);
182} 180}
183 181
184EXPORT_SYMBOL(machine_power_off);
185 182
186/* Used by sysrq-p, among others. I don't believe r9-r15 are ever 183/* Used by sysrq-p, among others. I don't believe r9-r15 are ever
187 saved in the context it's used. */ 184 saved in the context it's used. */
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index bbea636ff687..409db6d5ec99 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -131,7 +131,6 @@ void machine_halt(void)
131{ 131{
132} 132}
133 133
134EXPORT_SYMBOL(machine_halt);
135 134
136void machine_power_off(void) 135void machine_power_off(void)
137{ 136{
@@ -139,7 +138,6 @@ void machine_power_off(void)
139 pm_power_off(); 138 pm_power_off();
140} 139}
141 140
142EXPORT_SYMBOL(machine_power_off);
143 141
144void machine_restart(char * __unused) 142void machine_restart(char * __unused)
145{ 143{
@@ -169,8 +167,6 @@ void machine_restart(char * __unused)
169 while (1); 167 while (1);
170} 168}
171 169
172EXPORT_SYMBOL(machine_restart);
173
174void __show_regs(struct pt_regs *regs) 170void __show_regs(struct pt_regs *regs)
175{ 171{
176 unsigned long flags = condition_codes(regs); 172 unsigned long flags = condition_codes(regs);
diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c
index 46aea6ac194d..9eb9964d32a7 100644
--- a/arch/arm26/kernel/process.c
+++ b/arch/arm26/kernel/process.c
@@ -103,9 +103,6 @@ void machine_power_off(void)
103{ 103{
104} 104}
105 105
106EXPORT_SYMBOL(machine_halt);
107EXPORT_SYMBOL(machine_power_off);
108
109void machine_restart(char * __unused) 106void machine_restart(char * __unused)
110{ 107{
111 /* 108 /*
@@ -136,8 +133,6 @@ void machine_restart(char * __unused)
136 while (1); 133 while (1);
137} 134}
138 135
139EXPORT_SYMBOL(machine_restart);
140
141void show_regs(struct pt_regs * regs) 136void show_regs(struct pt_regs * regs)
142{ 137{
143 unsigned long flags; 138 unsigned long flags;
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 7645c4d4de6f..a5ad2b675853 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -214,8 +214,6 @@ void machine_restart(char *cmd)
214 hard_reset_now(); 214 hard_reset_now();
215} 215}
216 216
217EXPORT_SYMBOL(machine_restart);
218
219/* 217/*
220 * Similar to machine_power_off, but don't shut off power. Add code 218 * Similar to machine_power_off, but don't shut off power. Add code
221 * here to freeze the system for e.g. post-mortem debug purpose when 219 * here to freeze the system for e.g. post-mortem debug purpose when
@@ -226,16 +224,12 @@ void machine_halt(void)
226{ 224{
227} 225}
228 226
229EXPORT_SYMBOL(machine_halt);
230
231/* If or when software power-off is implemented, add code here. */ 227/* If or when software power-off is implemented, add code here. */
232 228
233void machine_power_off(void) 229void machine_power_off(void)
234{ 230{
235} 231}
236 232
237EXPORT_SYMBOL(machine_power_off);
238
239/* 233/*
240 * When a process does an "exec", machine state like FPU and debug 234 * When a process does an "exec", machine state like FPU and debug
241 * registers need to be reset. This is a hook function for that. 235 * registers need to be reset. This is a hook function for that.
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index b5f83e9f04db..27f1fce64ce4 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -90,8 +90,6 @@ void machine_restart(char * __unused)
90 __asm__("jmp @@0"); 90 __asm__("jmp @@0");
91} 91}
92 92
93EXPORT_SYMBOL(machine_restart);
94
95void machine_halt(void) 93void machine_halt(void)
96{ 94{
97 local_irq_disable(); 95 local_irq_disable();
@@ -99,8 +97,6 @@ void machine_halt(void)
99 for (;;); 97 for (;;);
100} 98}
101 99
102EXPORT_SYMBOL(machine_halt);
103
104void machine_power_off(void) 100void machine_power_off(void)
105{ 101{
106 local_irq_disable(); 102 local_irq_disable();
@@ -108,8 +104,6 @@ void machine_power_off(void)
108 for (;;); 104 for (;;);
109} 105}
110 106
111EXPORT_SYMBOL(machine_power_off);
112
113void show_regs(struct pt_regs * regs) 107void show_regs(struct pt_regs * regs)
114{ 108{
115 printk("\nPC: %08lx Status: %02x", 109 printk("\nPC: %08lx Status: %02x",
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index b3e584849961..1b24bc7271af 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -337,14 +337,10 @@ void machine_restart(char * __unused)
337 machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); 337 machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
338} 338}
339 339
340EXPORT_SYMBOL(machine_restart);
341
342void machine_halt(void) 340void machine_halt(void)
343{ 341{
344} 342}
345 343
346EXPORT_SYMBOL(machine_halt);
347
348void machine_power_off(void) 344void machine_power_off(void)
349{ 345{
350 lapic_shutdown(); 346 lapic_shutdown();
@@ -355,5 +351,4 @@ void machine_power_off(void)
355 pm_power_off(); 351 pm_power_off();
356} 352}
357 353
358EXPORT_SYMBOL(machine_power_off);
359 354
diff --git a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c
index 95e4676594e1..9e9296676f93 100644
--- a/arch/i386/mach-visws/reboot.c
+++ b/arch/i386/mach-visws/reboot.c
@@ -22,8 +22,6 @@ void machine_restart(char * __unused)
22 outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT); 22 outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
23} 23}
24 24
25EXPORT_SYMBOL(machine_restart);
26
27void machine_power_off(void) 25void machine_power_off(void)
28{ 26{
29 unsigned short pm_status; 27 unsigned short pm_status;
@@ -43,10 +41,7 @@ void machine_power_off(void)
43 outl(PIIX_SPECIAL_STOP, 0xCFC); 41 outl(PIIX_SPECIAL_STOP, 0xCFC);
44} 42}
45 43
46EXPORT_SYMBOL(machine_power_off);
47
48void machine_halt(void) 44void machine_halt(void)
49{ 45{
50} 46}
51 47
52EXPORT_SYMBOL(machine_halt);
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
index 8680080a6a89..b3eda46e0fe9 100644
--- a/arch/i386/mach-voyager/voyager_basic.c
+++ b/arch/i386/mach-voyager/voyager_basic.c
@@ -278,8 +278,6 @@ machine_restart(char *cmd)
278 } 278 }
279} 279}
280 280
281EXPORT_SYMBOL(machine_restart);
282
283void 281void
284mca_nmi_hook(void) 282mca_nmi_hook(void)
285{ 283{
@@ -315,12 +313,9 @@ machine_halt(void)
315 machine_power_off(); 313 machine_power_off();
316} 314}
317 315
318EXPORT_SYMBOL(machine_halt);
319
320void machine_power_off(void) 316void machine_power_off(void)
321{ 317{
322 if (pm_power_off) 318 if (pm_power_off)
323 pm_power_off(); 319 pm_power_off();
324} 320}
325 321
326EXPORT_SYMBOL(machine_power_off);
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index e484910246ad..66e840609808 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -807,16 +807,12 @@ machine_restart (char *restart_cmd)
807 (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL); 807 (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL);
808} 808}
809 809
810EXPORT_SYMBOL(machine_restart);
811
812void 810void
813machine_halt (void) 811machine_halt (void)
814{ 812{
815 cpu_halt(); 813 cpu_halt();
816} 814}
817 815
818EXPORT_SYMBOL(machine_halt);
819
820void 816void
821machine_power_off (void) 817machine_power_off (void)
822{ 818{
@@ -825,4 +821,3 @@ machine_power_off (void)
825 machine_halt(); 821 machine_halt();
826} 822}
827 823
828EXPORT_SYMBOL(machine_power_off);
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index b556c3cf6495..ea13a8f4d8b0 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -115,8 +115,6 @@ void machine_restart(char *__unused)
115 cpu_relax(); 115 cpu_relax();
116} 116}
117 117
118EXPORT_SYMBOL(machine_restart);
119
120void machine_halt(void) 118void machine_halt(void)
121{ 119{
122 printk("Please push reset button!\n"); 120 printk("Please push reset button!\n");
@@ -124,15 +122,11 @@ void machine_halt(void)
124 cpu_relax(); 122 cpu_relax();
125} 123}
126 124
127EXPORT_SYMBOL(machine_halt);
128
129void machine_power_off(void) 125void machine_power_off(void)
130{ 126{
131 /* M32R_FIXME */ 127 /* M32R_FIXME */
132} 128}
133 129
134EXPORT_SYMBOL(machine_power_off);
135
136static int __init idle_setup (char *str) 130static int __init idle_setup (char *str)
137{ 131{
138 if (!strncmp(str, "poll", 4)) { 132 if (!strncmp(str, "poll", 4)) {
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 93b043e2a435..11b1b90ba6ba 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -113,8 +113,6 @@ void machine_restart(char * __unused)
113 for (;;); 113 for (;;);
114} 114}
115 115
116EXPORT_SYMBOL(machine_restart);
117
118void machine_halt(void) 116void machine_halt(void)
119{ 117{
120 if (mach_halt) 118 if (mach_halt)
@@ -122,8 +120,6 @@ void machine_halt(void)
122 for (;;); 120 for (;;);
123} 121}
124 122
125EXPORT_SYMBOL(machine_halt);
126
127void machine_power_off(void) 123void machine_power_off(void)
128{ 124{
129 if (mach_power_off) 125 if (mach_power_off)
@@ -131,8 +127,6 @@ void machine_power_off(void)
131 for (;;); 127 for (;;);
132} 128}
133 129
134EXPORT_SYMBOL(machine_power_off);
135
136void show_regs(struct pt_regs * regs) 130void show_regs(struct pt_regs * regs)
137{ 131{
138 printk("\n"); 132 printk("\n");
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index c4a33f265dc0..82e7ec888806 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -80,8 +80,6 @@ void machine_restart(char * __unused)
80 for (;;); 80 for (;;);
81} 81}
82 82
83EXPORT_SYMBOL(machine_restart);
84
85void machine_halt(void) 83void machine_halt(void)
86{ 84{
87 if (mach_halt) 85 if (mach_halt)
@@ -89,8 +87,6 @@ void machine_halt(void)
89 for (;;); 87 for (;;);
90} 88}
91 89
92EXPORT_SYMBOL(machine_halt);
93
94void machine_power_off(void) 90void machine_power_off(void)
95{ 91{
96 if (mach_power_off) 92 if (mach_power_off)
@@ -98,8 +94,6 @@ void machine_power_off(void)
98 for (;;); 94 for (;;);
99} 95}
100 96
101EXPORT_SYMBOL(machine_power_off);
102
103void show_regs(struct pt_regs * regs) 97void show_regs(struct pt_regs * regs)
104{ 98{
105 printk(KERN_NOTICE "\n"); 99 printk(KERN_NOTICE "\n");
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 7e0a9821931a..ae2ba67b7ef6 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -26,18 +26,13 @@ void machine_restart(char *command)
26 _machine_restart(command); 26 _machine_restart(command);
27} 27}
28 28
29EXPORT_SYMBOL(machine_restart);
30
31void machine_halt(void) 29void machine_halt(void)
32{ 30{
33 _machine_halt(); 31 _machine_halt();
34} 32}
35 33
36EXPORT_SYMBOL(machine_halt);
37
38void machine_power_off(void) 34void machine_power_off(void)
39{ 35{
40 _machine_power_off(); 36 _machine_power_off();
41} 37}
42 38
43EXPORT_SYMBOL(machine_power_off);
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 46e4a6881f11..4fc04501d5e5 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -150,8 +150,6 @@ void machine_restart(char *cmd)
150 150
151} 151}
152 152
153EXPORT_SYMBOL(machine_restart);
154
155void machine_halt(void) 153void machine_halt(void)
156{ 154{
157 /* 155 /*
@@ -160,8 +158,6 @@ void machine_halt(void)
160 */ 158 */
161} 159}
162 160
163EXPORT_SYMBOL(machine_halt);
164
165 161
166/* 162/*
167 * This routine is called from sys_reboot to actually turn off the 163 * This routine is called from sys_reboot to actually turn off the
@@ -187,8 +183,6 @@ void machine_power_off(void)
187 KERN_EMERG "Please power this system off now."); 183 KERN_EMERG "Please power this system off now.");
188} 184}
189 185
190EXPORT_SYMBOL(machine_power_off);
191
192 186
193/* 187/*
194 * Create a kernel thread 188 * Create a kernel thread
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index c42f75326939..929e5d1cc7fe 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -121,8 +121,6 @@ void machine_restart(char *cmd)
121 ppc_md.restart(cmd); 121 ppc_md.restart(cmd);
122} 122}
123 123
124EXPORT_SYMBOL(machine_restart);
125
126void machine_power_off(void) 124void machine_power_off(void)
127{ 125{
128#ifdef CONFIG_NVRAM 126#ifdef CONFIG_NVRAM
@@ -131,8 +129,6 @@ void machine_power_off(void)
131 ppc_md.power_off(); 129 ppc_md.power_off();
132} 130}
133 131
134EXPORT_SYMBOL(machine_power_off);
135
136void machine_halt(void) 132void machine_halt(void)
137{ 133{
138#ifdef CONFIG_NVRAM 134#ifdef CONFIG_NVRAM
@@ -141,8 +137,6 @@ void machine_halt(void)
141 ppc_md.halt(); 137 ppc_md.halt();
142} 138}
143 139
144EXPORT_SYMBOL(machine_halt);
145
146void (*pm_power_off)(void) = machine_power_off; 140void (*pm_power_off)(void) = machine_power_off;
147 141
148#ifdef CONFIG_TAU 142#ifdef CONFIG_TAU
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c
index d1b33f0b26cb..e80f10c89824 100644
--- a/arch/ppc64/kernel/setup.c
+++ b/arch/ppc64/kernel/setup.c
@@ -694,7 +694,6 @@ void machine_restart(char *cmd)
694 local_irq_disable(); 694 local_irq_disable();
695 while (1) ; 695 while (1) ;
696} 696}
697EXPORT_SYMBOL(machine_restart);
698 697
699void machine_power_off(void) 698void machine_power_off(void)
700{ 699{
@@ -707,7 +706,6 @@ void machine_power_off(void)
707 local_irq_disable(); 706 local_irq_disable();
708 while (1) ; 707 while (1) ;
709} 708}
710EXPORT_SYMBOL(machine_power_off);
711 709
712void machine_halt(void) 710void machine_halt(void)
713{ 711{
@@ -720,7 +718,6 @@ void machine_halt(void)
720 local_irq_disable(); 718 local_irq_disable();
721 while (1) ; 719 while (1) ;
722} 720}
723EXPORT_SYMBOL(machine_halt);
724 721
725static int ppc64_panic_event(struct notifier_block *this, 722static int ppc64_panic_event(struct notifier_block *this,
726 unsigned long event, void *ptr) 723 unsigned long event, void *ptr)
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index b6d740ac0e6e..a12183989a79 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -299,24 +299,18 @@ void machine_restart(char *command)
299 _machine_restart(command); 299 _machine_restart(command);
300} 300}
301 301
302EXPORT_SYMBOL(machine_restart);
303
304void machine_halt(void) 302void machine_halt(void)
305{ 303{
306 console_unblank(); 304 console_unblank();
307 _machine_halt(); 305 _machine_halt();
308} 306}
309 307
310EXPORT_SYMBOL(machine_halt);
311
312void machine_power_off(void) 308void machine_power_off(void)
313{ 309{
314 console_unblank(); 310 console_unblank();
315 _machine_power_off(); 311 _machine_power_off();
316} 312}
317 313
318EXPORT_SYMBOL(machine_power_off);
319
320static void __init 314static void __init
321add_memory_hole(unsigned long start, unsigned long end) 315add_memory_hole(unsigned long start, unsigned long end)
322{ 316{
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 3d024590c24e..6dce9d0b81f8 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -80,8 +80,6 @@ void machine_restart(char * __unused)
80 "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001)); 80 "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
81} 81}
82 82
83EXPORT_SYMBOL(machine_restart);
84
85void machine_halt(void) 83void machine_halt(void)
86{ 84{
87#if defined(CONFIG_SH_HS7751RVOIP) 85#if defined(CONFIG_SH_HS7751RVOIP)
@@ -96,8 +94,6 @@ void machine_halt(void)
96 cpu_sleep(); 94 cpu_sleep();
97} 95}
98 96
99EXPORT_SYMBOL(machine_halt);
100
101void machine_power_off(void) 97void machine_power_off(void)
102{ 98{
103#if defined(CONFIG_SH_HS7751RVOIP) 99#if defined(CONFIG_SH_HS7751RVOIP)
@@ -110,8 +106,6 @@ void machine_power_off(void)
110#endif 106#endif
111} 107}
112 108
113EXPORT_SYMBOL(machine_power_off);
114
115void show_regs(struct pt_regs * regs) 109void show_regs(struct pt_regs * regs)
116{ 110{
117 printk("\n"); 111 printk("\n");
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 2c216ffeea90..29e72b57d4fd 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -158,8 +158,6 @@ void machine_halt(void)
158 panic("Halt failed!"); 158 panic("Halt failed!");
159} 159}
160 160
161EXPORT_SYMBOL(machine_halt);
162
163void machine_restart(char * cmd) 161void machine_restart(char * cmd)
164{ 162{
165 char *p; 163 char *p;
@@ -180,8 +178,6 @@ void machine_restart(char * cmd)
180 panic("Reboot failed!"); 178 panic("Reboot failed!");
181} 179}
182 180
183EXPORT_SYMBOL(machine_restart);
184
185void machine_power_off(void) 181void machine_power_off(void)
186{ 182{
187#ifdef CONFIG_SUN_AUXIO 183#ifdef CONFIG_SUN_AUXIO
@@ -191,8 +187,6 @@ void machine_power_off(void)
191 machine_halt(); 187 machine_halt();
192} 188}
193 189
194EXPORT_SYMBOL(machine_power_off);
195
196static DEFINE_SPINLOCK(sparc_backtrace_lock); 190static DEFINE_SPINLOCK(sparc_backtrace_lock);
197 191
198void __show_backtrace(unsigned long fp) 192void __show_backtrace(unsigned long fp)
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 533104c7907d..946cee0257ea 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -69,8 +69,6 @@ void machine_power_off(void)
69 machine_halt(); 69 machine_halt();
70} 70}
71 71
72EXPORT_SYMBOL(machine_power_off);
73
74#ifdef CONFIG_PCI 72#ifdef CONFIG_PCI
75static int powerd(void *__unused) 73static int powerd(void *__unused)
76{ 74{
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index cffb1c8ab4fc..07424b075938 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -124,8 +124,6 @@ void machine_halt(void)
124 panic("Halt failed!"); 124 panic("Halt failed!");
125} 125}
126 126
127EXPORT_SYMBOL(machine_halt);
128
129void machine_alt_power_off(void) 127void machine_alt_power_off(void)
130{ 128{
131 if (!serial_console && prom_palette) 129 if (!serial_console && prom_palette)
@@ -154,8 +152,6 @@ void machine_restart(char * cmd)
154 panic("Reboot failed!"); 152 panic("Reboot failed!");
155} 153}
156 154
157EXPORT_SYMBOL(machine_restart);
158
159static void show_regwindow32(struct pt_regs *regs) 155static void show_regwindow32(struct pt_regs *regs)
160{ 156{
161 struct reg_window32 __user *rw; 157 struct reg_window32 __user *rw;
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index fcec51da1d37..a637e885c583 100644
--- a/arch/um/kernel/reboot.c
+++ b/arch/um/kernel/reboot.c
@@ -49,23 +49,17 @@ void machine_restart(char * __unused)
49 CHOOSE_MODE(reboot_tt(), reboot_skas()); 49 CHOOSE_MODE(reboot_tt(), reboot_skas());
50} 50}
51 51
52EXPORT_SYMBOL(machine_restart);
53
54void machine_power_off(void) 52void machine_power_off(void)
55{ 53{
56 uml_cleanup(); 54 uml_cleanup();
57 CHOOSE_MODE(halt_tt(), halt_skas()); 55 CHOOSE_MODE(halt_tt(), halt_skas());
58} 56}
59 57
60EXPORT_SYMBOL(machine_power_off);
61
62void machine_halt(void) 58void machine_halt(void)
63{ 59{
64 machine_power_off(); 60 machine_power_off();
65} 61}
66 62
67EXPORT_SYMBOL(machine_halt);
68
69/* 63/*
70 * Overrides for Emacs so that we follow Linus's tabbing style. 64 * Overrides for Emacs so that we follow Linus's tabbing style.
71 * Emacs will notice this stuff at the end of the file and automatically 65 * Emacs will notice this stuff at the end of the file and automatically
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c
index 6aaeab5e8a40..d0502e142437 100644
--- a/arch/v850/kernel/anna.c
+++ b/arch/v850/kernel/anna.c
@@ -132,8 +132,6 @@ void machine_restart (char *__unused)
132 asm ("jmp r0"); /* Jump to the reset vector. */ 132 asm ("jmp r0"); /* Jump to the reset vector. */
133} 133}
134 134
135EXPORT_SYMBOL(machine_restart);
136
137void machine_halt (void) 135void machine_halt (void)
138{ 136{
139#ifdef CONFIG_RESET_GUARD 137#ifdef CONFIG_RESET_GUARD
@@ -145,15 +143,11 @@ void machine_halt (void)
145 asm ("halt; nop; nop; nop; nop; nop"); 143 asm ("halt; nop; nop; nop; nop; nop");
146} 144}
147 145
148EXPORT_SYMBOL(machine_halt);
149
150void machine_power_off (void) 146void machine_power_off (void)
151{ 147{
152 machine_halt (); 148 machine_halt ();
153} 149}
154 150
155EXPORT_SYMBOL(machine_power_off);
156
157/* Called before configuring an on-chip UART. */ 151/* Called before configuring an on-chip UART. */
158void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) 152void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
159{ 153{
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c
index 4059b1df11b5..d78c5e4ea9bc 100644
--- a/arch/v850/kernel/as85ep1.c
+++ b/arch/v850/kernel/as85ep1.c
@@ -160,8 +160,6 @@ void machine_restart (char *__unused)
160 asm ("jmp r0"); /* Jump to the reset vector. */ 160 asm ("jmp r0"); /* Jump to the reset vector. */
161} 161}
162 162
163EXPORT_SYMBOL(machine_restart);
164
165void machine_halt (void) 163void machine_halt (void)
166{ 164{
167#ifdef CONFIG_RESET_GUARD 165#ifdef CONFIG_RESET_GUARD
@@ -173,15 +171,11 @@ void machine_halt (void)
173 asm ("halt; nop; nop; nop; nop; nop"); 171 asm ("halt; nop; nop; nop; nop; nop");
174} 172}
175 173
176EXPORT_SYMBOL(machine_halt);
177
178void machine_power_off (void) 174void machine_power_off (void)
179{ 175{
180 machine_halt (); 176 machine_halt ();
181} 177}
182 178
183EXPORT_SYMBOL(machine_power_off);
184
185/* Called before configuring an on-chip UART. */ 179/* Called before configuring an on-chip UART. */
186void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) 180void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
187{ 181{
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
index 4bac5149b3c2..d8094519ad85 100644
--- a/arch/v850/kernel/fpga85e2c.c
+++ b/arch/v850/kernel/fpga85e2c.c
@@ -121,22 +121,16 @@ void machine_halt (void)
121 } 121 }
122} 122}
123 123
124EXPORT_SYMBOL(machine_halt);
125
126void machine_restart (char *__unused) 124void machine_restart (char *__unused)
127{ 125{
128 machine_halt (); 126 machine_halt ();
129} 127}
130 128
131EXPORT_SYMBOL(machine_restart);
132
133void machine_power_off (void) 129void machine_power_off (void)
134{ 130{
135 machine_halt (); 131 machine_halt ();
136} 132}
137 133
138EXPORT_SYMBOL(machine_power_off);
139
140 134
141/* Interrupts */ 135/* Interrupts */
142 136
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c
index 7ba397f77aca..0c794b9e0f9b 100644
--- a/arch/v850/kernel/rte_cb.c
+++ b/arch/v850/kernel/rte_cb.c
@@ -67,8 +67,6 @@ void machine_restart (char *__unused)
67 asm ("jmp r0"); /* Jump to the reset vector. */ 67 asm ("jmp r0"); /* Jump to the reset vector. */
68} 68}
69 69
70EXPORT_SYMBOL(machine_restart);
71
72/* This says `HALt.' in LEDese. */ 70/* This says `HALt.' in LEDese. */
73static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 }; 71static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 };
74 72
@@ -89,15 +87,11 @@ void machine_halt (void)
89 asm ("halt; nop; nop; nop; nop; nop"); 87 asm ("halt; nop; nop; nop; nop; nop");
90} 88}
91 89
92EXPORT_SYMBOL(machine_halt);
93
94void machine_power_off (void) 90void machine_power_off (void)
95{ 91{
96 machine_halt (); 92 machine_halt ();
97} 93}
98 94
99EXPORT_SYMBOL(machine_power_off);
100
101 95
102/* Animated LED display for timer tick. */ 96/* Animated LED display for timer tick. */
103 97
diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c
index 4f31da962632..e2cc5580fa2a 100644
--- a/arch/v850/kernel/sim.c
+++ b/arch/v850/kernel/sim.c
@@ -104,24 +104,18 @@ void machine_restart (char *__unused)
104 V850_SIM_SYSCALL (exit, 0); 104 V850_SIM_SYSCALL (exit, 0);
105} 105}
106 106
107EXPORT_SYMBOL(machine_restart);
108
109void machine_halt (void) 107void machine_halt (void)
110{ 108{
111 V850_SIM_SYSCALL (write, 1, "HALT\n", 5); 109 V850_SIM_SYSCALL (write, 1, "HALT\n", 5);
112 V850_SIM_SYSCALL (exit, 0); 110 V850_SIM_SYSCALL (exit, 0);
113} 111}
114 112
115EXPORT_SYMBOL(machine_halt);
116
117void machine_power_off (void) 113void machine_power_off (void)
118{ 114{
119 V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10); 115 V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10);
120 V850_SIM_SYSCALL (exit, 0); 116 V850_SIM_SYSCALL (exit, 0);
121} 117}
122 118
123EXPORT_SYMBOL(machine_power_off);
124
125 119
126/* Load data from a file called NAME into ram. The address and length 120/* Load data from a file called NAME into ram. The address and length
127 of the data image are returned in ADDR and LEN. */ 121 of the data image are returned in ADDR and LEN. */
diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c
index 93a722b516bb..9111613fb53a 100644
--- a/arch/v850/kernel/sim85e2.c
+++ b/arch/v850/kernel/sim85e2.c
@@ -184,18 +184,13 @@ void machine_halt (void)
184 for (;;) {} 184 for (;;) {}
185} 185}
186 186
187EXPORT_SYMBOL(machine_halt);
188
189void machine_restart (char *__unused) 187void machine_restart (char *__unused)
190{ 188{
191 machine_halt (); 189 machine_halt ();
192} 190}
193 191
194EXPORT_SYMBOL(machine_restart);
195
196void machine_power_off (void) 192void machine_power_off (void)
197{ 193{
198 machine_halt (); 194 machine_halt ();
199} 195}
200 196
201EXPORT_SYMBOL(machine_power_off);
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
index 57e71dbdfd69..0515d3266634 100644
--- a/arch/x86_64/kernel/reboot.c
+++ b/arch/x86_64/kernel/reboot.c
@@ -150,18 +150,13 @@ void machine_restart(char * __unused)
150 } 150 }
151} 151}
152 152
153EXPORT_SYMBOL(machine_restart);
154
155void machine_halt(void) 153void machine_halt(void)
156{ 154{
157} 155}
158 156
159EXPORT_SYMBOL(machine_halt);
160
161void machine_power_off(void) 157void machine_power_off(void)
162{ 158{
163 if (pm_power_off) 159 if (pm_power_off)
164 pm_power_off(); 160 pm_power_off();
165} 161}
166 162
167EXPORT_SYMBOL(machine_power_off);