diff options
-rw-r--r-- | arch/arm/oprofile/op_model_mpcore.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c index 898500718249..7791da791f5f 100644 --- a/arch/arm/oprofile/op_model_mpcore.c +++ b/arch/arm/oprofile/op_model_mpcore.c | |||
@@ -257,8 +257,13 @@ static void em_stop(void) | |||
257 | */ | 257 | */ |
258 | static void em_route_irq(int irq, unsigned int cpu) | 258 | static void em_route_irq(int irq, unsigned int cpu) |
259 | { | 259 | { |
260 | irq_desc[irq].affinity = cpumask_of_cpu(cpu); | 260 | struct irq_desc *desc = irq_desc + irq; |
261 | irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); | 261 | cpumask_t mask = cpumask_of_cpu(cpu); |
262 | |||
263 | spin_lock_irq(&desc->lock); | ||
264 | desc->affinity = mask; | ||
265 | desc->chip->set_affinity(irq, mask); | ||
266 | spin_unlock_irq(&desc->lock); | ||
262 | } | 267 | } |
263 | 268 | ||
264 | static int em_setup(void) | 269 | static int em_setup(void) |