Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=451fe00cf7fd48ba55acd1c8b891e7a65e1b3f81
Commit:     451fe00cf7fd48ba55acd1c8b891e7a65e1b3f81
Parent:     06f87adff12e52429390b22c57443665b073cd82
Author:     Alex Williamson <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 24 22:48:04 2007 -0700
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Mon Feb 5 14:09:51 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/iosapic.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 0fc5fb7..d6aab40 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -925,6 +925,11 @@ iosapic_unregister_intr (unsigned int gsi)
                        /* Clear the interrupt controller descriptor */
                        idesc->chip = &no_irq_type;
 
+#ifdef CONFIG_SMP
+                       /* Clear affinity */
+                       cpus_setall(idesc->affinity);
+#endif
+
                        /* Clear the interrupt information */
                        memset(&iosapic_intr_info[vector], 0,
                               sizeof(struct iosapic_intr_info));
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to