diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-26 08:19:43 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-27 05:48:42 -0400 |
commit | 5388a6b266e9c3357353332ba0cd5549082887f1 (patch) | |
tree | 9d035a01bb75fa466e70cd9590eb963a30f3d53d /arch/arm/kernel | |
parent | 9ca03a21e320a6bf44559323527aba704bcc8772 (diff) |
ARM: SMP: Always enable clock event broadcast support
The TWD local timers are unable to wake up the CPU when it is placed
into a low power mode, eg. C3. Therefore, we need to adapt things
such that the TWD code can cope with this.
We do this by always providing a broadcast tick function, and marking
the fact that the TWD local timer will stop in low power modes. This
means that when the CPU is placed into a low power mode, the core
timer code marks this fact, and allows an IPI to be given to the core.
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/arm/kernel/smp_twd.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index b8c3d0f689d9..0170e248a1dd 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -429,7 +429,11 @@ static void smp_timer_broadcast(const struct cpumask *mask) | |||
429 | { | 429 | { |
430 | send_ipi_message(mask, IPI_TIMER); | 430 | send_ipi_message(mask, IPI_TIMER); |
431 | } | 431 | } |
432 | #else | ||
433 | #define smp_timer_broadcast NULL | ||
434 | #endif | ||
432 | 435 | ||
436 | #ifndef CONFIG_LOCAL_TIMERS | ||
433 | static void broadcast_timer_set_mode(enum clock_event_mode mode, | 437 | static void broadcast_timer_set_mode(enum clock_event_mode mode, |
434 | struct clock_event_device *evt) | 438 | struct clock_event_device *evt) |
435 | { | 439 | { |
@@ -444,7 +448,6 @@ static void local_timer_setup(struct clock_event_device *evt) | |||
444 | evt->rating = 400; | 448 | evt->rating = 400; |
445 | evt->mult = 1; | 449 | evt->mult = 1; |
446 | evt->set_mode = broadcast_timer_set_mode; | 450 | evt->set_mode = broadcast_timer_set_mode; |
447 | evt->broadcast = smp_timer_broadcast; | ||
448 | 451 | ||
449 | clockevents_register_device(evt); | 452 | clockevents_register_device(evt); |
450 | } | 453 | } |
@@ -456,6 +459,7 @@ void __cpuinit percpu_timer_setup(void) | |||
456 | struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu); | 459 | struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu); |
457 | 460 | ||
458 | evt->cpumask = cpumask_of(cpu); | 461 | evt->cpumask = cpumask_of(cpu); |
462 | evt->broadcast = smp_timer_broadcast; | ||
459 | 463 | ||
460 | local_timer_setup(evt); | 464 | local_timer_setup(evt); |
461 | } | 465 | } |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 7c5f0c024db7..35882fbf37f9 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -132,7 +132,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
132 | twd_calibrate_rate(); | 132 | twd_calibrate_rate(); |
133 | 133 | ||
134 | clk->name = "local_timer"; | 134 | clk->name = "local_timer"; |
135 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; | 135 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | |
136 | CLOCK_EVT_FEAT_C3STOP; | ||
136 | clk->rating = 350; | 137 | clk->rating = 350; |
137 | clk->set_mode = twd_set_mode; | 138 | clk->set_mode = twd_set_mode; |
138 | clk->set_next_event = twd_set_next_event; | 139 | clk->set_next_event = twd_set_next_event; |