From owner-svn-src-stable@FreeBSD.ORG Wed Feb 17 21:17:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4EA61065672; Wed, 17 Feb 2010 21:17:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA48A8FC1F; Wed, 17 Feb 2010 21:17:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HLHs4C059597; Wed, 17 Feb 2010 21:17:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HLHsE6059594; Wed, 17 Feb 2010 21:17:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002172117.o1HLHsE6059594@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Feb 2010 21:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204012 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:17:54 -0000 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"));