]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs
authorWill Deacon <will.deacon@arm.com>
Fri, 27 Apr 2012 11:56:24 +0000 (12:56 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:42 +0000 (08:34 +0200)
commit827988b501834e66e77157897d373463a1672c3e
tree2214c4abf3fcc03d8cdb94e51559f655a1a564ae
parent8da8d564585f51ae3ead37099711cd50edab7b66
ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs

When a CPU is hotplugged off, we migrate any IRQs currently affine to it
away and onto another online CPU by calling the irq_set_affinity
function of the relevant interrupt controller chip. This function
returns either IRQ_SET_MASK_OK or IRQ_SET_MASK_OK_NOCOPY, to indicate
whether irq_data.affinity was updated.

If we are forcefully migrating an interrupt (because the affinity mask
no longer identifies any online CPUs) then we should update the IRQ
affinity mask to reflect the new CPU set. Failure to do so can
potentially leave /proc/irq/n/smp_affinity identifying only offline
CPUs, which may confuse userspace IRQ balancing daemons.

This patch updates migrate_one_irq to copy the affinity mask when
the interrupt chip returns IRQ_SET_MASK_OK after forcefully changing the
affinity of an interrupt.

Cc: stable@vger.kernel.org
Reported-by: Leif Lindholm <leif.lindholm@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/irq.c