From owner-cvs-all@FreeBSD.ORG Fri Nov 21 14:23:27 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4F3816A4CE; Fri, 21 Nov 2003 14:23:27 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA7E043FCB; Fri, 21 Nov 2003 14:23:26 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hALMNQXJ020221; Fri, 21 Nov 2003 14:23:26 -0800 (PST) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hALMNQ7B020220; Fri, 21 Nov 2003 14:23:26 -0800 (PST) (envelope-from jhb) Message-Id: <200311212223.hALMNQ7B020220@repoman.freebsd.org> From: John Baldwin Date: Fri, 21 Nov 2003 14:23:26 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/alpha/alpha mp_machdep.c src/sys/amd64/amd64 mp_machdep.c src/sys/i386/i386 mp_machdep.c src/sys/ia64/ia64 mp_machdep.c src/sys/kern subr_smp.c src/sys/powerpc/powerpc mp_machdep.c src/sys/sparc64/sparc64 mp_machdep.c src/sys/sys ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2003 22:23:27 -0000 jhb 2003/11/21 14:23:26 PST FreeBSD src repository Modified files: sys/alpha/alpha mp_machdep.c sys/amd64/amd64 mp_machdep.c sys/i386/i386 mp_machdep.c sys/ia64/ia64 mp_machdep.c sys/kern subr_smp.c sys/powerpc/powerpc mp_machdep.c sys/sparc64/sparc64 mp_machdep.c sys/sys smp.h Log: - Split cpu_mp_probe() into two parts. cpu_mp_setmaxid() is still called very early (SI_SUB_TUNABLES - 1) and is responsible for setting mp_maxid. cpu_mp_probe() is now called at SI_SUB_CPU and determines if SMP is actually present and sets mp_ncpus and all_cpus. Splitting these up allows an architecture to probe CPUs later than SI_SUB_TUNABLES by just setting mp_maxid to MAXCPU in cpu_mp_setmaxid(). This could allow the CPU probing code to live in a module, for example, since modules sysinit's in modules cannot be invoked prior to SI_SUB_KLD. This is needed to re-enable the ACPI module on i386. - For the alpha SMP probing code, use LOCATE_PCS() instead of duplicating its contents in a few places. Also, add a smp_cpu_enabled() function to avoid duplicating some code. There is room for further code reduction later since much of this code is also present in cpu_mp_start(). - All archs besides i386 still set mp_maxid to the same values they set it to before this change. i386 now sets mp_maxid to MAXCPU. Tested on: alpha, amd64, i386, ia64, sparc64 Approved by: re (scottl) Revision Changes Path 1.49 +45 -22 src/sys/alpha/alpha/mp_machdep.c 1.228 +20 -5 src/sys/amd64/amd64/mp_machdep.c 1.226 +7 -8 src/sys/i386/i386/mp_machdep.c 1.52 +8 -2 src/sys/ia64/ia64/mp_machdep.c 1.179 +6 -6 src/sys/kern/subr_smp.c 1.11 +5 -0 src/sys/powerpc/powerpc/mp_machdep.c 1.24 +9 -3 src/sys/sparc64/sparc64/mp_machdep.c 1.74 +6 -0 src/sys/sys/smp.h