From owner-svn-src-all@FreeBSD.ORG Mon Sep 19 18:29:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84283106564A; Mon, 19 Sep 2011 18:29:15 +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 730058FC12; Mon, 19 Sep 2011 18:29:15 +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 p8JITFPJ091403; Mon, 19 Sep 2011 18:29:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8JITF0Y091400; Mon, 19 Sep 2011 18:29:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201109191829.p8JITF0Y091400@svn.freebsd.org> From: Attilio Rao Date: Mon, 19 Sep 2011 18:29:15 +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: r225675 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2011 18:29:15 -0000 Author: attilio Date: Mon Sep 19 18:29:15 2011 New Revision: 225675 URL: http://svn.freebsd.org/changeset/base/225675 Log: It is safe to initialize locks even on early boot (and it is the same thing all the other architectures already do) thus just initialize kernel_pmap in pmap_bootstrap(). Reported by: alc Reviewed by: alc, marius Tested by: flo, marius Approved by: re (kib) MFC after: 1 week Modified: head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Mon Sep 19 16:28:36 2011 (r225674) +++ head/sys/sparc64/sparc64/machdep.c Mon Sep 19 18:29:15 2011 (r225675) @@ -597,11 +597,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l wrpr(pil, 0, 0); wrpr(pstate, 0, PSTATE_KERNEL); - /* - * Finish pmap initialization now that we're ready for mutexes. - */ - PMAP_LOCK_INIT(kernel_pmap); - OF_getprop(root, "name", sparc64_model, sizeof(sparc64_model) - 1); kdb_init(); Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Mon Sep 19 16:28:36 2011 (r225674) +++ head/sys/sparc64/sparc64/pmap.c Mon Sep 19 18:29:15 2011 (r225675) @@ -671,11 +671,9 @@ pmap_bootstrap(u_int cpu_impl) /* * Initialize the kernel pmap (which is statically allocated). - * NOTE: PMAP_LOCK_INIT() is needed as part of the initialization - * but sparc64 start up is not ready to initialize mutexes yet. - * It is called in machdep.c. */ pm = kernel_pmap; + PMAP_LOCK_INIT(pm); for (i = 0; i < MAXCPU; i++) pm->pm_context[i] = TLB_CTX_KERNEL; CPU_FILL(&pm->pm_active);