ia64/linux-2.6.18-xen.hg

changeset 791:4f998fd102e2

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@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 04 12:26:00 2009 +0000 (2009-02-04)
parents 77e3b255381e
children db9857bb0320
files arch/i386/pci/pcifront.c drivers/xen/core/evtchn.c
line diff
     1.1 --- a/arch/i386/pci/pcifront.c	Wed Feb 04 12:25:09 2009 +0000
     1.2 +++ b/arch/i386/pci/pcifront.c	Wed Feb 04 12:26:00 2009 +0000
     1.3 @@ -8,12 +8,14 @@
     1.4  #include <linux/init.h>
     1.5  #include <linux/pci.h>
     1.6  #include <asm/acpi.h>
     1.7 +#include <xen/evtchn.h>
     1.8  #include "pci.h"
     1.9  
    1.10  static int pcifront_enable_irq(struct pci_dev *dev)
    1.11  {
    1.12  	u8 irq;
    1.13  	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
    1.14 +	evtchn_register_pirq(irq);
    1.15  	dev->irq = irq;
    1.16  
    1.17  	return 0;
     2.1 --- a/drivers/xen/core/evtchn.c	Wed Feb 04 12:25:09 2009 +0000
     2.2 +++ b/drivers/xen/core/evtchn.c	Wed Feb 04 12:26:00 2009 +0000
     2.3 @@ -1078,7 +1078,7 @@ void irq_resume(void)
     2.4  void evtchn_register_pirq(int irq)
     2.5  {
     2.6  	BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
     2.7 -	if (identity_mapped_irq(irq))
     2.8 +	if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
     2.9  		return;
    2.10  	irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);
    2.11  	irq_desc[irq].chip = &pirq_type;