diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 22:49:40 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 17:39:24 +0200 |
commit | 01426478df3a8791ff5c8b6b82d409e699cfaf38 (patch) | |
tree | baabc8028b91ed33c7cc20f92acb76b29c5d39d3 /arch/avr32/kernel/time.c | |
parent | 0087298f68a726493a637c4f68d148b31102b0d9 (diff) |
avr32: Use generic idle loop
Also replace the idle poll enforcement by the generic functionality.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Link: http://lkml.kernel.org/r/20130321215233.950290809@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/avr32/kernel/time.c')
-rw-r--r-- | arch/avr32/kernel/time.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 05ad29112ff..869a1c6ffee 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c @@ -12,6 +12,7 @@ #include <linux/irq.h> #include <linux/kernel.h> #include <linux/time.h> +#include <linux/cpu.h> #include <asm/sysreg.h> @@ -87,13 +88,17 @@ static void comparator_mode(enum clock_event_mode mode, pr_debug("%s: start\n", evdev->name); /* FALLTHROUGH */ case CLOCK_EVT_MODE_RESUME: - cpu_disable_idle_sleep(); + /* + * If we're using the COUNT and COMPARE registers we + * need to force idle poll. + */ + cpu_idle_poll_ctrl(true); break; case CLOCK_EVT_MODE_UNUSED: case CLOCK_EVT_MODE_SHUTDOWN: sysreg_write(COMPARE, 0); pr_debug("%s: stop\n", evdev->name); - cpu_enable_idle_sleep(); + cpu_idle_poll_ctrl(false); break; default: BUG(); |