]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/791-x86-pcifront-register-pirq.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / 791-x86-pcifront-register-pirq.patch
1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/4f998fd102e2
2 # HG changeset 791 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
4 # Date 1233750360 0
5 # Node ID 4f998fd102e24daa471482730d1a3ff68faa1ad6
6 # Parent 77e3b255381e02021d460d535e44b1040a180773
7 Subject: linux: fix IRQ handling for PV passthrough
8 References: bnc#463596
9 Patch-mainline: obsolete
10
11 For DomU-s registering PIRQ-s must be done separately, as they don't
12 use the IO-APIC code.
13
14 Additionally make sure the IRQ chip doesn't get set twice (and the
15 event channel information overwritten) for an IRQ possibly in use by
16 more than one device.
17
18 Signed-off-by: Jan Beulich <jbeulich@novell.com>
19
20 --- sle11-2009-02-05.orig/arch/x86/pci/pcifront.c 2009-02-05 10:01:48.000000000 +0100
21 +++ sle11-2009-02-05/arch/x86/pci/pcifront.c 2009-02-05 10:20:20.000000000 +0100
22 @@ -8,12 +8,14 @@
23 #include <linux/init.h>
24 #include <linux/pci.h>
25 #include <asm/acpi.h>
26 +#include <xen/evtchn.h>
27 #include "pci.h"
28
29 static int pcifront_enable_irq(struct pci_dev *dev)
30 {
31 u8 irq;
32 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
33 + evtchn_register_pirq(irq);
34 dev->irq = irq;
35
36 return 0;
37 --- sle11-2009-02-05.orig/drivers/xen/core/evtchn.c 2009-02-05 10:20:03.000000000 +0100
38 +++ sle11-2009-02-05/drivers/xen/core/evtchn.c 2009-02-05 10:20:20.000000000 +0100
39 @@ -1078,7 +1078,7 @@ void irq_resume(void)
40 void evtchn_register_pirq(int irq)
41 {
42 BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
43 - if (identity_mapped_irq(irq))
44 + if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
45 return;
46 irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);
47 irq_desc[irq].chip = &pirq_type;