Date: Wed, 17 Feb 2010 21:17:54 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r204012 - in stable/7/sys: amd64/amd64 i386/i386 Message-ID: <201002172117.o1HLHsE6059594@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002172117.o1HLHsE6059594>