The diff that was posted and commited was broken. Here is a revision of
the diff that actually builds.


Index: pci_machdep.c
===================================================================
RCS file: /home/cvs/src/sys/arch/i386/pci/pci_machdep.c,v
retrieving revision 1.72
diff -u -p -r1.72 pci_machdep.c
--- pci_machdep.c       22 Sep 2012 11:02:36 -0000      1.72
+++ pci_machdep.c       24 Sep 2012 19:37:16 -0000
@@ -780,7 +780,7 @@ pci_intr_establish(pci_chipset_tag_t pc,
 
        if (ih.line & APIC_INT_VIA_MSG) {
                struct intrhand *ih;
-               pcireg_t reg;
+               pcireg_t reg, addr;
                int off, vec;
 
                if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, &reg) == 0)
@@ -807,12 +807,14 @@ pci_intr_establish(pci_chipset_tag_t pc,
                apic_intrhand[vec] = ih;
                idt_vec_set(vec, apichandler[vec & 0xf]);
 
+               addr = 0xfee00000UL | (cpu_info_primary.ci_apicid << 12);
+
                if (reg & PCI_MSI_MC_C64) {
-                       pci_conf_write(pc, tag, off + PCI_MSI_MA, 0xfee00000);
+                       pci_conf_write(pc, tag, off + PCI_MSI_MA, addr);
                        pci_conf_write(pc, tag, off + PCI_MSI_MAU32, 0);
                        pci_conf_write(pc, tag, off + PCI_MSI_MD64, vec);
                } else {
-                       pci_conf_write(pc, tag, off + PCI_MSI_MA, 0xfee00000);
+                       pci_conf_write(pc, tag, off + PCI_MSI_MA, addr);
                        pci_conf_write(pc, tag, off + PCI_MSI_MD32, vec);
                }
                pci_conf_write(pc, tag, off, reg | PCI_MSI_MC_MSIE);

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to