summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2014-09-01 17:14:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-05 14:54:10 -0700
commit824a5f2628d62a196b67d6bde4a7fd43bd3f1abe (patch)
tree5f2a253e227a011570a51695d7af38e3b6ff26e1 /arch
parent92e40eb084aa0f91f60c1a52e0d3f75201f014b2 (diff)
downloadlinux-3.10-824a5f2628d62a196b67d6bde4a7fd43bd3f1abe.tar.gz
linux-3.10-824a5f2628d62a196b67d6bde4a7fd43bd3f1abe.tar.bz2
linux-3.10-824a5f2628d62a196b67d6bde4a7fd43bd3f1abe.zip
ARM: 8133/1: use irq_set_affinity with force=false when migrating irqs
commit a040803a9d6b8c1876d3487a5cb69602ebcbb82c upstream. Since commit 1dbfa187dad ("ARM: irq migration: force migration off CPU going down") the ARM interrupt migration code on cpu offline calls irqchip.irq_set_affinity() with the argument force=true. At the point of this change the argument had no effect because it was not used by any interrupt chip driver and there was no semantics defined. This changed with commit 01f8fa4f01d8 ("genirq: Allow forcing cpu affinity of interrupts") which made the force argument useful to route interrupts to not yet online cpus without checking the target cpu against the cpu online mask. The following commit ffde1de64012 ("irqchip: gic: Support forced affinity setting") implemented this for the GIC interrupt controller. As a consequence the ARM cpu offline irq migration fails if CPU0 is offlined, because CPU0 is still set in the affinity mask and the validataion against cpu online mask is skipped to the force argument being true. The following first_cpu(mask) selection always selects CPU0 as the target. Solve the issue by calling irq_set_affinity() with force=false from the CPU offline irq migration code so the GIC driver validates the affinity mask against CPU online mask and therefore removes CPU0 from the possible target candidates. Tested on TC2 hotpluging CPU0 in and out. Without this patch the system locks up as the IRQs are not migrated away from CPU0. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 9723d17b8f3..1e782bdeee4 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -163,7 +163,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
c = irq_data_get_irq_chip(d);
if (!c->irq_set_affinity)
pr_debug("IRQ%u: unable to set affinity\n", d->irq);
- else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
+ else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && ret)
cpumask_copy(d->affinity, affinity);
return ret;