aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-02-15 08:38:40 -0500
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2008-02-15 08:55:10 -0500
commitd45ad06273f797f6239b97fd9962ecd81eec847f (patch)
treead601f9ef094dd43fc5fd06a163e79df90dc8f4a /arch/avr32
parentf059267e7fa9e3efa1498eb963ba18ec25665c42 (diff)
avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop
This fixes a hang on boot with nohz enabled. nohz is not actually supported in mainline yet, but patches that add support for it are currently under review. When nohz is compiled out, the functions are no-ops, so this patch results in no functional change, but it arguably makes the code more correct. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/kernel/process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index eaaa69bbdc38..faf8d0e76801 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -11,6 +11,7 @@
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/ptrace.h> 12#include <linux/ptrace.h>
13#include <linux/reboot.h> 13#include <linux/reboot.h>
14#include <linux/tick.h>
14#include <linux/uaccess.h> 15#include <linux/uaccess.h>
15#include <linux/unistd.h> 16#include <linux/unistd.h>
16 17
@@ -30,8 +31,10 @@ void cpu_idle(void)
30{ 31{
31 /* endless idle loop with no priority at all */ 32 /* endless idle loop with no priority at all */
32 while (1) { 33 while (1) {
34 tick_nohz_stop_sched_tick();
33 while (!need_resched()) 35 while (!need_resched())
34 cpu_idle_sleep(); 36 cpu_idle_sleep();
37 tick_nohz_restart_sched_tick();
35 preempt_enable_no_resched(); 38 preempt_enable_no_resched();
36 schedule(); 39 schedule();
37 preempt_disable(); 40 preempt_disable();