]> Pileus Git - ~andy/linux/blobdiff - arch/sparc/kernel/process_32.c
sparc: Use generic idle loop
[~andy/linux] / arch / sparc / kernel / process_32.c
index 62eede13831a2685694986165c5ac11a36daceda..c85241006e32853a0cb71e768a99506aa2b9e246 100644 (file)
@@ -64,23 +64,12 @@ extern void fpsave(unsigned long *, unsigned long *, void *, unsigned long *);
 struct task_struct *last_task_used_math = NULL;
 struct thread_info *current_set[NR_CPUS];
 
-/*
- * the idle loop on a Sparc... ;)
- */
-void cpu_idle(void)
+/* Idle loop support. */
+void arch_cpu_idle(void)
 {
-       set_thread_flag(TIF_POLLING_NRFLAG);
-
-       /* endless idle loop with no priority at all */
-       for (;;) {
-               while (!need_resched()) {
-                       if (sparc_idle)
-                               (*sparc_idle)();
-                       else
-                               cpu_relax();
-               }
-               schedule_preempt_disabled();
-       }
+       if (sparc_idle)
+               (*sparc_idle)();
+       local_irq_enable();
 }
 
 /* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */