MIPS: SMP-CPS: Add support for irq migration when CPU offline
PATCH 1/1 MIPS: SMP-CPS: Add support for irq migration when CPU offline
Currently we won't migrate irqs when offline CPUs, which has been implemented on most architectures. That will lead to some devices work incorrectly if the bound cores are offline.
While that can be easily supported by enabling GENERIC_IRQ_MIGRATION. But i don't pretty known the reason it was not supported on all MIPS platforms.
This patch add the support for irq migration on MIPS CPS platform, and it's tested on the interAptiv processor.
--- arch/mips/Kconfig | 1 + arch/mips/kernel/smp-cps.c | 2 ++ 2 files changed, 3 insertions(+)
arch/mips/Kconfig +1 -0
@@ -2510,6 +2510,7 @@ config MIPS_CPS select SYS_SUPPORTS_SCHED_SMT if CPU_MIPSR6 select SYS_SUPPORTS_SMP select WEAK_ORDERING + select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU help Select this if you wish to run an SMP kernel across multiple cores within a MIPS Coherent Processing System. When this option is
arch/mips/kernel/smp-cps.c +2 -0
@@ -12,6 +12,7 @@#include <linux/slab.h> #include <linux/smp.h> #include <linux/types.h> +#include <linux/irq.h> #include <asm/bcache.h> #include <asm/mips-cps.h>
@@ -465,6 +466,7 @@ static int cps_cpu_disable(void)smp_mb__after_atomic ();set_cpu_online (cpu, false);calculate_cpu_foreign_map (); +irq_migrate_all_off_this_cpu ();return 0 ; }
Signature · 1 line
2.17.1
Quoted 8 lines · Wei Li
Currently we won't migrate irqs when offline CPUs, which has been implemented on most architectures. That will lead to some devices work incorrectly if the bound cores are offline.
While that can be easily supported by enabling
GENERIC_IRQ_MIGRATION. But i don't pretty known the reason it was not supported on all MIPS platforms.
Quoted 8 lines
This patch add the support for irq migration on MIPS CPS platform, and it's tested on the interAptiv processor.
Signed-off-by Wei Li <[email protected]>--- arch/mips/Kconfig | 1 + arch/mips/kernel/smp-cps.c | 2 ++ 2 files changed, 3 insertions(+)
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]