svn commit: r204012 - in stable/7/sys: amd64/amd64 i386/i386
John Baldwin
jhb at FreeBSD.org
Wed Feb 17 21:17:54 UTC 2010
Author: jhb
Date: Wed Feb 17 21:17:54 2010
New Revision: 204012
URL: http://svn.freebsd.org/changeset/base/204012
Log:
Fix a bug where MSI interrupts on x86 were always routed to APIC ID 0 rather
than the APIC ID of the boot CPU prior to SI_SUB_SMP. This resulted in
some storage controllers not being able to enumerate attached devices when
using MSI/MSI-X interrupts. This only affects <= 7.x, so it is a direct
commit to 7 rather than an MFC.
Reviewed by: scottl
Approved by: re (kib)
Modified:
stable/7/sys/amd64/amd64/msi.c
stable/7/sys/i386/i386/msi.c
Modified: stable/7/sys/amd64/amd64/msi.c
==============================================================================
--- stable/7/sys/amd64/amd64/msi.c Wed Feb 17 17:34:55 2010 (r204011)
+++ stable/7/sys/amd64/amd64/msi.c Wed Feb 17 21:17:54 2010 (r204012)
@@ -321,6 +321,7 @@ again:
for (i = 0; i < count; i++) {
msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]);
msi->msi_dev = dev;
+ msi->msi_cpu = PCPU_GET(apic_id);
msi->msi_vector = vector + i;
if (bootverbose)
printf("msi: routing MSI IRQ %d to vector %u\n",
@@ -477,6 +478,7 @@ again:
/* Setup source. */
msi->msi_dev = dev;
msi->msi_vector = vector;
+ msi->msi_cpu = PCPU_GET(apic_id);
msi->msi_msix = 1;
KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers"));
Modified: stable/7/sys/i386/i386/msi.c
==============================================================================
--- stable/7/sys/i386/i386/msi.c Wed Feb 17 17:34:55 2010 (r204011)
+++ stable/7/sys/i386/i386/msi.c Wed Feb 17 21:17:54 2010 (r204012)
@@ -321,6 +321,7 @@ again:
for (i = 0; i < count; i++) {
msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]);
msi->msi_dev = dev;
+ msi->msi_cpu = PCPU_GET(apic_id);
msi->msi_vector = vector + i;
if (bootverbose)
printf("msi: routing MSI IRQ %d to vector %u\n",
@@ -477,6 +478,7 @@ again:
/* Setup source. */
msi->msi_dev = dev;
msi->msi_vector = vector;
+ msi->msi_cpu = PCPU_GET(apic_id);
msi->msi_msix = 1;
KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers"));
More information about the svn-src-stable-7
mailing list