Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295316
b: refs/heads/master
c: 4fa2043
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Jan 20, 2012
1 parent 3c46c0b commit 8f7445b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c0b2cef913c8f92b15a5a1fe7b611836f7f80bf
refs/heads/master: 4fa20439a80c008d33f2865b0db94dcb5da467e2
1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ extern void cpu_init(void);

void soft_restart(unsigned long);
extern void (*arm_pm_restart)(char str, const char *cmd);
extern void (*arm_pm_idle)(void);

#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)
Expand Down
23 changes: 15 additions & 8 deletions trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@ void cpu_idle_wait(void)
EXPORT_SYMBOL_GPL(cpu_idle_wait);

/*
* This is our default idle handler. We need to disable
* interrupts here to ensure we don't miss a wakeup call.
* This is our default idle handler.
*/

void (*arm_pm_idle)(void);

static void default_idle(void)
{
if (!need_resched())
if (arm_pm_idle)
arm_pm_idle();
else
arch_idle();
local_irq_enable();
}
Expand Down Expand Up @@ -215,26 +219,29 @@ void cpu_idle(void)
cpu_die();
#endif

/*
* We need to disable interrupts here
* to ensure we don't miss a wakeup call.
*/
local_irq_disable();
#ifdef CONFIG_PL310_ERRATA_769419
wmb();
#endif
if (hlt_counter) {
local_irq_enable();
cpu_relax();
} else {
} else if (!need_resched()) {
stop_critical_timings();
if (cpuidle_idle_call())
pm_idle();
start_critical_timings();
/*
* This will eventually be removed - pm_idle
* functions should always return with IRQs
* enabled.
* pm_idle functions must always
* return with IRQs enabled.
*/
WARN_ON(irqs_disabled());
} else
local_irq_enable();
}
}
leds_event(led_idle_end);
rcu_idle_exit();
Expand Down

0 comments on commit 8f7445b

Please sign in to comment.