diff options
author | Will Deacon <will.deacon@arm.com> | 2012-11-23 12:55:30 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-11-28 04:46:57 -0500 |
commit | ea3aacf5f22c1002cac97985354658072232e280 (patch) | |
tree | aecbe3136c65dccf303001668da3ff257a4deac5 /arch/arm/common | |
parent | e23739b4ade80a3a7f87198f008f6c44a7cbc9fd (diff) |
ARM: 7586/1: sp804: set cpumask to cpu_possible_mask for clock event device
The SP804 driver statically initialises the cpumask of the clock event
device to be cpu_all_mask, which is derived from the compile-time
constant NR_CPUS. This breaks SMP_ON_UP systems where the interrupt
controller handling the sp804 doesn't have the irq_set_affinity callback
on the irq_chip, because the common timer code fails to identify the
device as cpu-local and ends up treating it as a broadcast device
instead.
This patch fixes the problem by using cpu_possible_mask at runtime,
which will correctly represent the possible CPUs when SMP_ON_UP is being
used.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/timer-sp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index df13a3ffff35..9d2d3ba339ff 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -162,7 +162,6 @@ static struct clock_event_device sp804_clockevent = { | |||
162 | .set_mode = sp804_set_mode, | 162 | .set_mode = sp804_set_mode, |
163 | .set_next_event = sp804_set_next_event, | 163 | .set_next_event = sp804_set_next_event, |
164 | .rating = 300, | 164 | .rating = 300, |
165 | .cpumask = cpu_all_mask, | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | static struct irqaction sp804_timer_irq = { | 167 | static struct irqaction sp804_timer_irq = { |
@@ -185,6 +184,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, | |||
185 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); | 184 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); |
186 | evt->name = name; | 185 | evt->name = name; |
187 | evt->irq = irq; | 186 | evt->irq = irq; |
187 | evt->cpumask = cpu_possible_mask; | ||
188 | 188 | ||
189 | setup_irq(irq, &sp804_timer_irq); | 189 | setup_irq(irq, &sp804_timer_irq); |
190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); | 190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); |