Commit 038cb01e authored by David S. Miller's avatar David S. Miller

[SPARC64]: Add tick_nohz_{stop,restart}_sched_tick() calls to cpu_idle().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 777a4475
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/tick.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/oplib.h> #include <asm/oplib.h>
...@@ -88,12 +89,14 @@ void cpu_idle(void) ...@@ -88,12 +89,14 @@ void cpu_idle(void)
set_thread_flag(TIF_POLLING_NRFLAG); set_thread_flag(TIF_POLLING_NRFLAG);
while(1) { while(1) {
if (need_resched()) { tick_nohz_stop_sched_tick();
preempt_enable_no_resched(); while (!need_resched())
schedule(); sparc64_yield();
preempt_disable(); tick_nohz_restart_sched_tick();
}
sparc64_yield(); preempt_enable_no_resched();
schedule();
preempt_disable();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment