From owner-svn-src-head@FreeBSD.ORG Thu Oct 31 22:46:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 61D16D06; Thu, 31 Oct 2013 22:46:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F29A29AB; Thu, 31 Oct 2013 22:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9VMk4M5093824; Thu, 31 Oct 2013 22:46:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9VMk4kn093823; Thu, 31 Oct 2013 22:46:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201310312246.r9VMk4kn093823@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 31 Oct 2013 22:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257475 - head/sys/ia64/ia64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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, 31 Oct 2013 22:46:04 -0000 Author: marcel Date: Thu Oct 31 22:46:03 2013 New Revision: 257475 URL: http://svnweb.freebsd.org/changeset/base/257475 Log: Respect the kern.smp.disabled tunable. When we're scanning the MADT in ia64_probe_sapics(), we also create PCPU structures for any Local SAPICs we encounter. When SMP is disabled, this leaves us with partially setup PCPU structures, which typically results in panics when we're iterating over CPUs. When SMP is disabled, we now prevent the creation of the PCPU structures. Modified: head/sys/ia64/ia64/mp_machdep.c Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Thu Oct 31 21:16:47 2013 (r257474) +++ head/sys/ia64/ia64/mp_machdep.c Thu Oct 31 22:46:03 2013 (r257475) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); extern uint64_t bdata[]; +extern int smp_disabled; + MALLOC_DEFINE(M_SMP, "SMP", "SMP related allocations"); void ia64_ap_startup(void); @@ -294,6 +296,9 @@ cpu_mp_add(u_int acpi_id, u_int id, u_in void *dpcpu; u_int cpuid, sapic_id; + if (smp_disabled) + return; + sapic_id = SAPIC_ID_SET(id, eid); cpuid = (IA64_LID_GET_SAPIC_ID(ia64_get_lid()) == sapic_id) ? 0 : smp_cpus++;