aboutsummaryrefslogtreecommitdiffstats
path: root/arch/v850/kernel
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 /arch/v850/kernel
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>
Diffstat (limited to 'arch/v850/kernel')
-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
6 files changed, 0 insertions, 35 deletions
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);