[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] linux: fix IRQ handling for PV passthrough



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1233750360 0
# Node ID 4f998fd102e24daa471482730d1a3ff68faa1ad6
# Parent  77e3b255381e02021d460d535e44b1040a180773
linux: fix IRQ handling for PV passthrough

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@xxxxxxxxxx>
---
 arch/i386/pci/pcifront.c  |    2 ++
 drivers/xen/core/evtchn.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff -r 77e3b255381e -r 4f998fd102e2 arch/i386/pci/pcifront.c
--- a/arch/i386/pci/pcifront.c  Wed Feb 04 12:25:09 2009 +0000
+++ b/arch/i386/pci/pcifront.c  Wed Feb 04 12:26:00 2009 +0000
@@ -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;
diff -r 77e3b255381e -r 4f998fd102e2 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Wed Feb 04 12:25:09 2009 +0000
+++ b/drivers/xen/core/evtchn.c Wed Feb 04 12:26:00 2009 +0000
@@ -1078,7 +1078,7 @@ void evtchn_register_pirq(int irq)
 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;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.