arm: fix a migrating irq bug when hotplug cpu
PATCH 1/1 arm: fix a migrating irq bug when hotplug cpu
Arm TC2 fails cpu hotplug stress test.
This issue was tracked down to a missing copy of the new affinity cpumask for the vexpress-spc interrupt into struct irq_common_data.affinity when the interrupt is migrated in migrate_one_irq().
Fix it by replacing the arm specific hotplug cpu migration with the generic irq code.
This is the counterpart implementation to commit 217d453d473c ("arm64:
fix a migrating irq bug when hotplug cpu").
Tested with cpu hotplug stress test on Arm TC2 (multi_v7_defconfig plus CONFIG_ARM_BIG_LITTLE_CPUFREQ=y and CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=y). The vexpress-spc interrupt (irq=22) on this board is affine to CPU0. Its affinity cpumask now changes correctly e.g. from 0 to 1-4 when CPU0 is hotplugged out.
--- arch/arm/Kconfig | 1 + arch/arm/include/asm/irq.h | 1 - arch/arm/kernel/irq.c | 62 ---------------------------------------------- arch/arm/kernel/smp.c | 2 +- 4 files changed, 2 insertions(+), 64 deletions(-)
arch/arm/Kconfig +1 -0
@@ -1400,6 +1400,7 @@ config NR_CPUS config HOTPLUG_CPU bool "Support for hot-pluggable CPUs" depends on SMP + select GENERIC_IRQ_MIGRATION help Say Y here to experiment with turning CPUs off and on. CPUs can be controlled through /sys/devices/system/cpu.
arch/arm/include/asm/irq.h +0 -1
@@ -25,7 +25,6 @@#ifndef __ASSEMBLY__struct irqaction ;struct pt_regs ; -extern void migrate_irqs (void );extern void asm_do_IRQ (unsigned int ,struct pt_regs *);void handle_IRQ (unsigned int ,struct pt_regs *);
arch/arm/kernel/irq.c +0 -62
71 lines not on this page · raw message
arch/arm/kernel/smp.c +1 -1
@@ -254,7 +254,7 @@ int __cpu_disable(void)/* * OK - migrate IRQs away from this CPU */ -migrate_irqs (); +irq_migrate_all_off_this_cpu ();/* * Flush user cache and TLB mappings, and then remove this CPU
Signature · 1 line
2.11.0
Quoted 13 lines · Dietmar Eggemann
Arm TC2 fails cpu hotplug stress test.
This issue was tracked down to a missing copy of the new affinity cpumask for the vexpress-spc interrupt into struct irq_common_data.affinity when the interrupt is migrated in
migrate_one_irq().Fix it by replacing the arm specific hotplug cpu migration with the generic irq code.
This is the counterpart implementation to commit
217d453d473c("arm64:
fix a migrating irq bug when hotplug cpu").
Quoted 8 lines
Tested with cpu hotplug stress test on Arm TC2 (
multi_v7_defconfigplusCONFIG_ARM_BIG_LITTLE_CPUFREQ=yandCONFIG_ARM_VEXPRESS_SPC_CPUFREQ=y). The vexpress-spc interrupt (irq=22) on this board is affine to CPU0. Its affinity cpumask now changes correctly e.g. from 0 to 1-4 when CPU0 is hotplugged out.Suggested-by Marc Zyngier <[email protected]>Signed-off-by Dietmar Eggemann <[email protected]>
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Quoted 14 lines · Dietmar Eggemann
Arm TC2 fails cpu hotplug stress test.
This issue was tracked down to a missing copy of the new affinity cpumask for the vexpress-spc interrupt into struct irq_common_data.affinity when the interrupt is migrated in
migrate_one_irq().Fix it by replacing the arm specific hotplug cpu migration with the generic irq code.
This is the counterpart implementation to commit
217d453d473c("arm64:
fix a migrating irq bug when hotplug cpu").
Quoted 8 lines
Tested with cpu hotplug stress test on Arm TC2 (
multi_v7_defconfigplusCONFIG_ARM_BIG_LITTLE_CPUFREQ=yandCONFIG_ARM_VEXPRESS_SPC_CPUFREQ=y). The vexpress-spc interrupt (irq=22) on this board is affine to CPU0. Its affinity cpumask now changes correctly e.g. from 0 to 1-4 when CPU0 is hotplugged out.Suggested-by Marc Zyngier <[email protected]>Signed-off-by Dietmar Eggemann <[email protected]>
Looks solid to me(TM)
I would proceed to put it into Russell's patch tracker along with Marc's ACK so Russell can process it, see:
http://www.arm.linux.org.uk/developer/patches/
Yours,
Linus Walleij