aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/kernel/process.c')
-rw-r--r--arch/cris/kernel/process.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 9f7cad7c7849..949a0e40e03c 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -1,4 +1,4 @@
1/* $Id: process.c,v 1.17 2004/04/05 13:53:48 starvik Exp $ 1/* $Id: process.c,v 1.21 2005/03/04 08:16:17 starvik Exp $
2 * 2 *
3 * linux/arch/cris/kernel/process.c 3 * linux/arch/cris/kernel/process.c
4 * 4 *
@@ -8,6 +8,18 @@
8 * Authors: Bjorn Wesen (bjornw@axis.com) 8 * Authors: Bjorn Wesen (bjornw@axis.com)
9 * 9 *
10 * $Log: process.c,v $ 10 * $Log: process.c,v $
11 * Revision 1.21 2005/03/04 08:16:17 starvik
12 * Merge of Linux 2.6.11.
13 *
14 * Revision 1.20 2005/01/18 05:57:22 starvik
15 * Renamed hlt_counter to cris_hlt_counter and made it global.
16 *
17 * Revision 1.19 2004/10/19 13:07:43 starvik
18 * Merge of Linux 2.6.9
19 *
20 * Revision 1.18 2004/08/16 12:37:23 starvik
21 * Merge of Linux 2.6.8
22 *
11 * Revision 1.17 2004/04/05 13:53:48 starvik 23 * Revision 1.17 2004/04/05 13:53:48 starvik
12 * Merge of Linux 2.6.5 24 * Merge of Linux 2.6.5
13 * 25 *
@@ -113,6 +125,7 @@
113#include <linux/user.h> 125#include <linux/user.h>
114#include <linux/elfcore.h> 126#include <linux/elfcore.h>
115#include <linux/mqueue.h> 127#include <linux/mqueue.h>
128#include <linux/reboot.h>
116 129
117//#define DEBUG 130//#define DEBUG
118 131
@@ -160,18 +173,18 @@ EXPORT_SYMBOL(init_task);
160 * region by enable_hlt/disable_hlt. 173 * region by enable_hlt/disable_hlt.
161 */ 174 */
162 175
163static int hlt_counter=0; 176int cris_hlt_counter=0;
164 177
165void disable_hlt(void) 178void disable_hlt(void)
166{ 179{
167 hlt_counter++; 180 cris_hlt_counter++;
168} 181}
169 182
170EXPORT_SYMBOL(disable_hlt); 183EXPORT_SYMBOL(disable_hlt);
171 184
172void enable_hlt(void) 185void enable_hlt(void)
173{ 186{
174 hlt_counter--; 187 cris_hlt_counter--;
175} 188}
176 189
177EXPORT_SYMBOL(enable_hlt); 190EXPORT_SYMBOL(enable_hlt);
@@ -194,27 +207,28 @@ void cpu_idle (void)
194 /* endless idle loop with no priority at all */ 207 /* endless idle loop with no priority at all */
195 while (1) { 208 while (1) {
196 while (!need_resched()) { 209 while (!need_resched()) {
197 void (*idle)(void) = pm_idle; 210 void (*idle)(void);
198 211 /*
212 * Mark this as an RCU critical section so that
213 * synchronize_kernel() in the unload path waits
214 * for our completion.
215 */
216 idle = pm_idle;
199 if (!idle) 217 if (!idle)
200 idle = default_idle; 218 idle = default_idle;
201
202 idle(); 219 idle();
203 } 220 }
204 schedule(); 221 schedule();
205 } 222 }
206
207} 223}
208 224
209void hard_reset_now (void); 225void hard_reset_now (void);
210 226
211void machine_restart(void) 227void machine_restart(char *cmd)
212{ 228{
213 hard_reset_now(); 229 hard_reset_now();
214} 230}
215 231
216EXPORT_SYMBOL(machine_restart);
217
218/* 232/*
219 * Similar to machine_power_off, but don't shut off power. Add code 233 * Similar to machine_power_off, but don't shut off power. Add code
220 * here to freeze the system for e.g. post-mortem debug purpose when 234 * here to freeze the system for e.g. post-mortem debug purpose when
@@ -225,16 +239,12 @@ void machine_halt(void)
225{ 239{
226} 240}
227 241
228EXPORT_SYMBOL(machine_halt);
229
230/* If or when software power-off is implemented, add code here. */ 242/* If or when software power-off is implemented, add code here. */
231 243
232void machine_power_off(void) 244void machine_power_off(void)
233{ 245{
234} 246}
235 247
236EXPORT_SYMBOL(machine_power_off);
237
238/* 248/*
239 * When a process does an "exec", machine state like FPU and debug 249 * When a process does an "exec", machine state like FPU and debug
240 * registers need to be reset. This is a hook function for that. 250 * registers need to be reset. This is a hook function for that.