Skip to content

Commit

Permalink
avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen committed Feb 15, 2008
1 parent f059267 commit d45ad06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/avr32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/fs.h>
#include <linux/ptrace.h>
#include <linux/reboot.h>
#include <linux/tick.h>
#include <linux/uaccess.h>
#include <linux/unistd.h>

Expand All @@ -30,8 +31,10 @@ void cpu_idle(void)
{
/* endless idle loop with no priority at all */
while (1) {
tick_nohz_stop_sched_tick();
while (!need_resched())
cpu_idle_sleep();
tick_nohz_restart_sched_tick();
preempt_enable_no_resched();
schedule();
preempt_disable();
Expand Down

0 comments on commit d45ad06

Please sign in to comment.