diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-02 21:38:22 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-02 21:38:22 -0500 |
| commit | cfa024f4e45562c50b9eccb23649ab103578037b (patch) | |
| tree | d49992521230a4e302c6d4bef9191e885220b82e /arch/arm/kernel/irq.c | |
| parent | 3a7142371efdc95f4c5b5ffc188b18efdc4e64dd (diff) | |
| parent | a054a811597a17ffbe92bc4db04a4dc2f1b1ea55 (diff) | |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
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 */ | ||
