aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2007-01-25 00:48:04 -0500
committerTony Luck <tony.luck@intel.com>2007-02-05 17:09:51 -0500
commit451fe00cf7fd48ba55acd1c8b891e7a65e1b3f81 (patch)
treebfcdcefad73d32948fe4626af8720fc8c174b4a5 /arch/ia64
parent06f87adff12e52429390b22c57443665b073cd82 (diff)
[IA64] Clear IRQ affinity when unregistered
When we offline a CPU, migrate_irqs() tries to determine whether the affinity bits of the IRQ descriptor match any of the remaining online CPUs. If not, it fixes up the interrupt to point somewhere else. Unfortunately, if an IRQ is unregistered the IRQ descriptor may still have affinity to the CPU being offlined, but the no_irq_chip handler doesn't provide a set_affinity function. This causes us to hit the WARN_ON in migrate_irqs(). The easiest solution seems to be setting all the bits in the affinity mask when the last interrupt is removed from the vector. I hit this on an older kernel with Xen/ia64 using driver domains (so it probably needs more testing on upstream). Xen essentially uses the bind/unbind interface in sysfs to unregister a device from a driver and thus unregister the interrupt. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/iosapic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 0fc5fb7865cf..d6aab40c6416 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -925,6 +925,11 @@ iosapic_unregister_intr (unsigned int gsi)
925 /* Clear the interrupt controller descriptor */ 925 /* Clear the interrupt controller descriptor */
926 idesc->chip = &no_irq_type; 926 idesc->chip = &no_irq_type;
927 927
928#ifdef CONFIG_SMP
929 /* Clear affinity */
930 cpus_setall(idesc->affinity);
931#endif
932
928 /* Clear the interrupt information */ 933 /* Clear the interrupt information */
929 memset(&iosapic_intr_info[vector], 0, 934 memset(&iosapic_intr_info[vector], 0,
930 sizeof(struct iosapic_intr_info)); 935 sizeof(struct iosapic_intr_info));