]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
linux: fix IRQ handling for PV passthrough
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 4 Feb 2009 12:26:00 +0000 (12:26 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 4 Feb 2009 12:26:00 +0000 (12:26 +0000)
For DomU-s registering PIRQ-s must be done separately, as they don't
use the IO-APIC code.

Additionally make sure the IRQ chip doesn't get set twice (and the
event channel information overwritten) for an IRQ possibly in use by
more than one device.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/pci/pcifront.c
drivers/xen/core/evtchn.c

index 7009115d6bd10968351badfd4e18e33e1dfd207d..34f3bcb93f0983b8d3fe64630c4c7bee19cec748 100644 (file)
@@ -8,12 +8,14 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <asm/acpi.h>
+#include <xen/evtchn.h>
 #include "pci.h"
 
 static int pcifront_enable_irq(struct pci_dev *dev)
 {
        u8 irq;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+       evtchn_register_pirq(irq);
        dev->irq = irq;
 
        return 0;
index e5c633df8186ea41a61e64d03f391a6cb93e9591..e358a3d1439361047070d623dea05a56c632be47 100644 (file)
@@ -1078,7 +1078,7 @@ void irq_resume(void)
 void evtchn_register_pirq(int irq)
 {
        BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
-       if (identity_mapped_irq(irq))
+       if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
                return;
        irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);
        irq_desc[irq].chip = &pirq_type;