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.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index a5ad2b675853..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 *
@@ -161,18 +173,18 @@ EXPORT_SYMBOL(init_task);
161 * region by enable_hlt/disable_hlt. 173 * region by enable_hlt/disable_hlt.
162 */ 174 */
163 175
164static int hlt_counter=0; 176int cris_hlt_counter=0;
165 177
166void disable_hlt(void) 178void disable_hlt(void)
167{ 179{
168 hlt_counter++; 180 cris_hlt_counter++;
169} 181}
170 182
171EXPORT_SYMBOL(disable_hlt); 183EXPORT_SYMBOL(disable_hlt);
172 184
173void enable_hlt(void) 185void enable_hlt(void)
174{ 186{
175 hlt_counter--; 187 cris_hlt_counter--;
176} 188}
177 189
178EXPORT_SYMBOL(enable_hlt); 190EXPORT_SYMBOL(enable_hlt);
@@ -195,16 +207,19 @@ void cpu_idle (void)
195 /* endless idle loop with no priority at all */ 207 /* endless idle loop with no priority at all */
196 while (1) { 208 while (1) {
197 while (!need_resched()) { 209 while (!need_resched()) {
198 void (*idle)(void) = pm_idle; 210 void (*idle)(void);
199 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;
200 if (!idle) 217 if (!idle)
201 idle = default_idle; 218 idle = default_idle;
202
203 idle(); 219 idle();
204 } 220 }
205 schedule(); 221 schedule();
206 } 222 }
207
208} 223}
209 224
210void hard_reset_now (void); 225void hard_reset_now (void);