|
@@ -28,6 +28,7 @@
|
|
|
#include <linux/reboot.h>
|
|
|
#include <linux/delay.h>
|
|
|
#include <linux/compat.h>
|
|
|
+#include <linux/tick.h>
|
|
|
#include <linux/init.h>
|
|
|
|
|
|
#include <asm/oplib.h>
|
|
@@ -88,12 +89,14 @@ void cpu_idle(void)
|
|
|
set_thread_flag(TIF_POLLING_NRFLAG);
|
|
|
|
|
|
while(1) {
|
|
|
- if (need_resched()) {
|
|
|
- preempt_enable_no_resched();
|
|
|
- schedule();
|
|
|
- preempt_disable();
|
|
|
- }
|
|
|
- sparc64_yield();
|
|
|
+ tick_nohz_stop_sched_tick();
|
|
|
+ while (!need_resched())
|
|
|
+ sparc64_yield();
|
|
|
+ tick_nohz_restart_sched_tick();
|
|
|
+
|
|
|
+ preempt_enable_no_resched();
|
|
|
+ schedule();
|
|
|
+ preempt_disable();
|
|
|
}
|
|
|
}
|
|
|
|