diff options
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r-- | arch/arm/kernel/irq.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 3284118f356b..9def4404e1f2 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -1050,3 +1050,34 @@ static int __init noirqdebug_setup(char *str) | |||
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | __setup("noirqdebug", noirqdebug_setup); | 1052 | __setup("noirqdebug", noirqdebug_setup); |
1053 | |||
1054 | #ifdef CONFIG_HOTPLUG_CPU | ||
1055 | /* | ||
1056 | * The CPU has been marked offline. Migrate IRQs off this CPU. If | ||
1057 | * the affinity settings do not allow other CPUs, force them onto any | ||
1058 | * available CPU. | ||
1059 | */ | ||
1060 | void migrate_irqs(void) | ||
1061 | { | ||
1062 | unsigned int i, cpu = smp_processor_id(); | ||
1063 | |||
1064 | for (i = 0; i < NR_IRQS; i++) { | ||
1065 | struct irqdesc *desc = irq_desc + i; | ||
1066 | |||
1067 | if (desc->cpu == cpu) { | ||
1068 | unsigned int newcpu = any_online_cpu(desc->affinity); | ||
1069 | |||
1070 | if (newcpu == NR_CPUS) { | ||
1071 | if (printk_ratelimit()) | ||
1072 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", | ||
1073 | i, cpu); | ||
1074 | |||
1075 | cpus_setall(desc->affinity); | ||
1076 | newcpu = any_online_cpu(desc->affinity); | ||
1077 | } | ||
1078 | |||
1079 | route_irq(desc, i, newcpu); | ||
1080 | } | ||
1081 | } | ||
1082 | } | ||
1083 | #endif /* CONFIG_HOTPLUG_CPU */ | ||