From owner-svn-src-head@FreeBSD.ORG Thu Oct 28 13:44:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6559106566B; Thu, 28 Oct 2010 13:44:19 +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 B58CB8FC18; Thu, 28 Oct 2010 13:44:19 +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 o9SDiJPG003015; Thu, 28 Oct 2010 13:44:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9SDiJ4c003012; Thu, 28 Oct 2010 13:44:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010281344.o9SDiJ4c003012@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Oct 2010 13:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214448 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 13:44:19 -0000 Author: jhb Date: Thu Oct 28 13:44:19 2010 New Revision: 214448 URL: http://svn.freebsd.org/changeset/base/214448 Log: Use 'PCPU_GET(apic_id)' to determine the BSP's APIC ID on a UP machine when routing interrupts instead of cpu_apic_ids[0] since cpu_apic_ids[] is only populated for multiple-CPU machines. This also matches what the code does when SMP is not enabled. PR: bin/151616 Tested by: "Damian S. Kolodziejczyk" damkol | gmail Submitted by: avg MFC after: 1 week Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/i386/i386/intr_machdep.c Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Thu Oct 28 11:09:12 2010 (r214447) +++ head/sys/amd64/amd64/intr_machdep.c Thu Oct 28 13:44:19 2010 (r214448) @@ -458,7 +458,7 @@ intr_next_cpu(void) /* Leave all interrupts on the BSP during boot. */ if (!assign_cpu) - return (cpu_apic_ids[0]); + return (PCPU_GET(apic_id)); mtx_lock_spin(&icu_lock); apic_id = cpu_apic_ids[current_cpu]; Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Thu Oct 28 11:09:12 2010 (r214447) +++ head/sys/i386/i386/intr_machdep.c Thu Oct 28 13:44:19 2010 (r214448) @@ -424,7 +424,7 @@ intr_next_cpu(void) /* Leave all interrupts on the BSP during boot. */ if (!assign_cpu) - return (cpu_apic_ids[0]); + return (PCPU_GET(apic_id)); mtx_lock_spin(&icu_lock); apic_id = cpu_apic_ids[current_cpu];