From owner-svn-src-head@FreeBSD.ORG Mon Apr 9 22:41:20 2012 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 4C678106564A; Mon, 9 Apr 2012 22:41:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8298FC12; Mon, 9 Apr 2012 22:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q39MfKZC081615; Mon, 9 Apr 2012 22:41:20 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q39MfJZn081610; Mon, 9 Apr 2012 22:41:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201204092241.q39MfJZn081610@svn.freebsd.org> From: Attilio Rao Date: Mon, 9 Apr 2012 22:41: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: r234074 - 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: Mon, 09 Apr 2012 22:41:20 -0000 Author: attilio Date: Mon Apr 9 22:41:19 2012 New Revision: 234074 URL: http://svn.freebsd.org/changeset/base/234074 Log: BSP is not added to the mask of valid target CPUs for interrupts in set_apic_interrupt_ids(). Besides, set_apic_interrupts_ids() is not called in the !SMP case too. Fix this by: - Adding the BSP as an interrupt target directly in cpu_startup(). - Remove an obsolete optimization where the BSP are skipped in set_apic_interrupt_ids(). Reported by: jh Reviewed by: jhb MFC after: 3 days X-MFC: r233961 Pointy hat to: me Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Apr 9 22:01:43 2012 (r234073) +++ head/sys/amd64/amd64/machdep.c Mon Apr 9 22:41:19 2012 (r234074) @@ -295,6 +295,11 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); + + /* + * Add BSP as an interrupt target. + */ + intr_add_cpu(0); } /* Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Apr 9 22:01:43 2012 (r234073) +++ head/sys/amd64/amd64/mp_machdep.c Mon Apr 9 22:41:19 2012 (r234074) @@ -785,8 +785,6 @@ init_secondary(void) * We tell the I/O APIC code about all the CPUs we want to receive * interrupts. If we don't want certain CPUs to receive IRQs we * can simply not tell the I/O APIC code about them in this function. - * We also do not tell it about the BSP since it tells itself about - * the BSP internally to work with UP kernels and on UP machines. */ static void set_interrupt_apic_ids(void) @@ -797,8 +795,6 @@ set_interrupt_apic_ids(void) apic_id = cpu_apic_ids[i]; if (apic_id == -1) continue; - if (cpu_info[apic_id].cpu_bsp) - continue; if (cpu_info[apic_id].cpu_disabled) continue; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Apr 9 22:01:43 2012 (r234073) +++ head/sys/i386/i386/machdep.c Mon Apr 9 22:41:19 2012 (r234074) @@ -336,6 +336,11 @@ cpu_startup(dummy) #ifndef XEN cpu_setregs(); #endif + + /* + * Add BSP as an interrupt target. + */ + intr_add_cpu(0); } /* Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Mon Apr 9 22:01:43 2012 (r234073) +++ head/sys/i386/i386/mp_machdep.c Mon Apr 9 22:41:19 2012 (r234074) @@ -819,8 +819,6 @@ init_secondary(void) * We tell the I/O APIC code about all the CPUs we want to receive * interrupts. If we don't want certain CPUs to receive IRQs we * can simply not tell the I/O APIC code about them in this function. - * We also do not tell it about the BSP since it tells itself about - * the BSP internally to work with UP kernels and on UP machines. */ static void set_interrupt_apic_ids(void) @@ -831,8 +829,6 @@ set_interrupt_apic_ids(void) apic_id = cpu_apic_ids[i]; if (apic_id == -1) continue; - if (cpu_info[apic_id].cpu_bsp) - continue; if (cpu_info[apic_id].cpu_disabled) continue;