aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-07-01 10:36:38 -0400
committerJames Hogan <james.hogan@imgtec.com>2013-07-02 09:12:22 -0400
commit8b8b2412994fffd5a8ab3b9209fa0aa9f0fcee4c (patch)
tree81b1d11fc31cefafe40ca39811d033a821be5285
parentf6b30d32d242243a967993789c4cf550d840727e (diff)
metag: cpu hotplug: route_irq: preserve irq mask
The route_irq() function needs to preserve the irq mask by using the _irqsave/irqrestore variants of raw spin lock functions instead of the _irq variants. This is because it is called from __cpu_disable() (via migrate_irqs()), which is called with IRQs disabled, so using the _irq variants re-enables IRQs. This appears to have been causing occasional hits of the BUG_ON(!irqs_disabled()) in __irq_work_run() during CPU hotplug soak testing: BUG: failure at kernel/irq_work.c:122/__irq_work_run()! Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
-rw-r--r--arch/metag/kernel/irq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/metag/kernel/irq.c b/arch/metag/kernel/irq.c
index d91b1e91346c..2a2c9d55187e 100644
--- a/arch/metag/kernel/irq.c
+++ b/arch/metag/kernel/irq.c
@@ -279,11 +279,12 @@ static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu)
279{ 279{
280 struct irq_desc *desc = irq_to_desc(irq); 280 struct irq_desc *desc = irq_to_desc(irq);
281 struct irq_chip *chip = irq_data_get_irq_chip(data); 281 struct irq_chip *chip = irq_data_get_irq_chip(data);
282 unsigned long flags;
282 283
283 raw_spin_lock_irq(&desc->lock); 284 raw_spin_lock_irqsave(&desc->lock, flags);
284 if (chip->irq_set_affinity) 285 if (chip->irq_set_affinity)
285 chip->irq_set_affinity(data, cpumask_of(cpu), false); 286 chip->irq_set_affinity(data, cpumask_of(cpu), false);
286 raw_spin_unlock_irq(&desc->lock); 287 raw_spin_unlock_irqrestore(&desc->lock, flags);
287} 288}
288 289
289/* 290/*