Module Name:    src
Committed By:   snj
Date:           Sat Oct  3 23:58:47 UTC 2009

Modified Files:
        src/sys/arch/xen/xen [netbsd-5]: pciback.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1054):
        sys/arch/xen/xen/pciback.c: revision 1.3
Unbind the event channel after mapping the interrupt. Otherwise domain0
will share the interrupt with the domU and xen will wait for domain0 to
ack the interrupt too. Now devices that don't share an interrupt with
a device in domain0 works too.
Make sure the same PCI bus isn't published multiple times.


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.3 -r1.4.6.4 src/sys/arch/xen/xen/pciback.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/pciback.c
diff -u src/sys/arch/xen/xen/pciback.c:1.4.6.3 src/sys/arch/xen/xen/pciback.c:1.4.6.4
--- src/sys/arch/xen/xen/pciback.c:1.4.6.3	Sat Oct  3 23:56:43 2009
+++ src/sys/arch/xen/xen/pciback.c	Sat Oct  3 23:58:47 2009
@@ -1,4 +1,4 @@
-/*      $NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $      */
+/*      $NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $      */
 
 /*
  * Copyright (c) 2009 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $");
 
 #include "opt_xen.h"
 #include "rnd.h"
@@ -272,6 +272,7 @@
 		aprint_normal_dev(self, "interrupting at %s\n",
 		    intrstr ? intrstr : "unknown interrupt");
 	}
+	unbind_pirq_from_evtch(APIC_IRQ_LEGACY_IRQ(sc->sc_intrhandle.pirq));
 	sc->sc_irq = APIC_IRQ_LEGACY_IRQ(sc->sc_intrhandle.pirq);
 	/* XXX should be done elsewhere ? */
 	reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_INTERRUPT_REG);
@@ -700,6 +701,7 @@
 				    err);
 			}
 			num_roots++;
+			bus[pbd->pb_bus]++;
 		}
 	}
 	err = xenbus_printf(NULL, pbxi->pbx_xbusd->xbusd_path, "root_num",

Reply via email to