From owner-svn-src-stable@FreeBSD.ORG Wed Feb 17 21:20:55 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 522CE1065692; Wed, 17 Feb 2010 21:20:55 +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 277748FC19; Wed, 17 Feb 2010 21:20:55 +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 o1HLKt1x060331; Wed, 17 Feb 2010 21:20:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HLKtbe060328; Wed, 17 Feb 2010 21:20:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002172120.o1HLKtbe060328@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Feb 2010 21:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204014 - in stable/6/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:20:55 -0000 Author: jhb Date: Wed Feb 17 21:20:54 2010 New Revision: 204014 URL: http://svn.freebsd.org/changeset/base/204014 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. Modified: stable/6/sys/amd64/amd64/msi.c stable/6/sys/i386/i386/msi.c Modified: stable/6/sys/amd64/amd64/msi.c ============================================================================== --- stable/6/sys/amd64/amd64/msi.c Wed Feb 17 21:19:10 2010 (r204013) +++ stable/6/sys/amd64/amd64/msi.c Wed Feb 17 21:20:54 2010 (r204014) @@ -301,6 +301,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", @@ -458,6 +459,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; /* XXX: Somewhat gross. */ Modified: stable/6/sys/i386/i386/msi.c ============================================================================== --- stable/6/sys/i386/i386/msi.c Wed Feb 17 21:19:10 2010 (r204013) +++ stable/6/sys/i386/i386/msi.c Wed Feb 17 21:20:54 2010 (r204014) @@ -301,6 +301,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", @@ -458,6 +459,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; /* XXX: Somewhat gross. */