diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-02-22 09:24:45 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 04:54:13 -0400 |
commit | 038cb01ea69cb24ecf30e3ec882e429c84badbeb (patch) | |
tree | f2d78d4d9092126ec5a3ca16f5145ea49ca08c18 /arch | |
parent | 777a447529ad138f5fceb9c9ad28bab19848f277 (diff) |
[SPARC64]: Add tick_nohz_{stop,restart}_sched_tick() calls to cpu_idle().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/process.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index b291060c25a6..a114151f9fbe 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/reboot.h> | 28 | #include <linux/reboot.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/compat.h> | 30 | #include <linux/compat.h> |
31 | #include <linux/tick.h> | ||
31 | #include <linux/init.h> | 32 | #include <linux/init.h> |
32 | 33 | ||
33 | #include <asm/oplib.h> | 34 | #include <asm/oplib.h> |
@@ -88,12 +89,14 @@ void cpu_idle(void) | |||
88 | set_thread_flag(TIF_POLLING_NRFLAG); | 89 | set_thread_flag(TIF_POLLING_NRFLAG); |
89 | 90 | ||
90 | while(1) { | 91 | while(1) { |
91 | if (need_resched()) { | 92 | tick_nohz_stop_sched_tick(); |
92 | preempt_enable_no_resched(); | 93 | while (!need_resched()) |
93 | schedule(); | 94 | sparc64_yield(); |
94 | preempt_disable(); | 95 | tick_nohz_restart_sched_tick(); |
95 | } | 96 | |
96 | sparc64_yield(); | 97 | preempt_enable_no_resched(); |
98 | schedule(); | ||
99 | preempt_disable(); | ||
97 | } | 100 | } |
98 | } | 101 | } |
99 | 102 | ||