]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm64: use cpu_online_mask when using forced irq_set_affinity
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 9 May 2014 16:37:44 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:29 +0000 (10:28 -0700)
commit3e32c277e17b859738f0d38a2e609ad926554ee9
tree1926410450516fd1d0f43fd6f64ffe8e68b8859f
parent3372ac6f0c1617a381f8a69ff1e7cc2e6751bdd3
arm64: use cpu_online_mask when using forced irq_set_affinity

commit 601c942176d8ad8334118bddb747e3720bed24f8 upstream.

Commit 01f8fa4f01d8("genirq: Allow forcing cpu affinity of interrupts")
enabled the forced irq_set_affinity which previously refused to route an
interrupt to an offline cpu.

Commit ffde1de64012("irqchip: Gic: Support forced affinity setting")
implements this force logic and disables the cpu online check for GIC
interrupt controller.

When __cpu_disable calls migrate_irqs, it disables the current cpu in
cpu_online_mask and uses forced irq_set_affinity to migrate the IRQs
away from the cpu but passes affinity mask with the cpu being offlined
also included in it.

When calling irq_set_affinity with force == true in a cpu hotplug path,
the caller must ensure that the cpu being offlined is not present in the
affinity mask or it may be selected as the target CPU, leading to the
interrupt not being migrated.

This patch uses cpu_online_mask when using forced irq_set_affinity so
that the IRQs are properly migrated away.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/irq.c