From owner-svn-src-head@freebsd.org Thu Dec 7 07:55:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFD34EA0481; Thu, 7 Dec 2017 07:55:40 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 897817AE45; Thu, 7 Dec 2017 07:55:40 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB77tdMY086456; Thu, 7 Dec 2017 07:55:39 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB77tcw3086446; Thu, 7 Dec 2017 07:55:38 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201712070755.vB77tcw3086446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 7 Dec 2017 07:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326656 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 X-SVN-Commit-Revision: 326656 X-SVN-Commit-Repository: base 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.25 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, 07 Dec 2017 07:55:40 -0000 Author: bde Date: Thu Dec 7 07:55:38 2017 New Revision: 326656 URL: https://svnweb.freebsd.org/changeset/base/326656 Log: Move instantiation of msgbufp from 9 MD files to subr_prf.c. This variable should be pure MI except possibly for reading it in MD dump routines. Its initialization was pure MD in 4.4BSD, but FreeBSD changed this in r36441 in 1998. There were many imperfections in r36441. This commit fixes only a small one, to simplify fixing the others 1 arch at a time. (r47678 added support for special/early/multiple message buffer initialization which I want in a more general form, but this was too fragile to use because hacking on the msgbufp global corrupted it, and was only used for 5 hours in -current...) Modified: head/sys/amd64/amd64/machdep.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/pmap-v6.c head/sys/arm64/arm64/pmap.c head/sys/i386/i386/pmap.c head/sys/kern/subr_prf.c head/sys/mips/mips/machdep.c head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/riscv/riscv/pmap.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/amd64/amd64/machdep.c Thu Dec 7 07:55:38 2017 (r326656) @@ -184,8 +184,6 @@ struct init_ops init_ops = { */ extern char kernphys[]; -struct msgbuf *msgbufp; - /* * Physical address of the EFI System Table. Stashed from the metadata hints * passed into the kernel and used by the EFI code to call runtime services. Modified: head/sys/arm/arm/pmap-v4.c ============================================================================== --- head/sys/arm/arm/pmap-v4.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm/arm/pmap-v4.c Thu Dec 7 07:55:38 2017 (r326656) @@ -265,8 +265,6 @@ void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys, int cnt); void (*pmap_zero_page_func)(vm_paddr_t, int, int); -struct msgbuf *msgbufp = NULL; - /* * Crashdump maps. */ Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm/arm/pmap-v6.c Thu Dec 7 07:55:38 2017 (r326656) @@ -294,8 +294,6 @@ vm_paddr_t first_managed_pa; */ caddr_t _tmppt = 0; -struct msgbuf *msgbufp = NULL; /* XXX move it to machdep.c */ - /* * Crashdump maps. */ Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm64/arm64/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -221,8 +221,6 @@ vm_offset_t virtual_avail; /* VA of first avail page ( vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t kernel_vm_end = 0; -struct msgbuf *msgbufp = NULL; - /* * Data for the pv entry allocation mechanism. * Updates to pv_invl_gen are protected by the pv_list_locks[] Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/i386/i386/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -255,7 +255,6 @@ pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t ptvmmap = 0; caddr_t CADDR3; -struct msgbuf *msgbufp = NULL; /* * Crashdump maps. Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/kern/subr_prf.c Thu Dec 7 07:55:38 2017 (r326656) @@ -122,6 +122,7 @@ static void snprintf_func(int ch, void *arg); static int msgbufmapped; /* Set when safe to use msgbuf */ int msgbuftrigger; +struct msgbuf *msgbufp; static int log_console_output = 1; SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RWTUN, Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/mips/mips/machdep.c Thu Dec 7 07:55:38 2017 (r326656) @@ -318,8 +318,6 @@ cpu_initclocks(void) cpu_initclocks_bsp(); } -struct msgbuf *msgbufp = NULL; - /* * Initialize the hardware exception vectors, and the jump table used to * call locore cache and TLB management functions, based on the kind Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Thu Dec 7 07:55:38 2017 (r326656) @@ -72,7 +72,6 @@ static struct kobj_ops mmu_kernel_kops; */ struct pmap kernel_pmap_store; -struct msgbuf *msgbufp; vm_offset_t msgbuf_phys; vm_offset_t kernel_vm_end; Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/riscv/riscv/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -220,8 +220,6 @@ vm_offset_t virtual_avail; /* VA of first avail page ( vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t kernel_vm_end = 0; -struct msgbuf *msgbufp = NULL; - vm_paddr_t dmap_phys_base; /* The start of the dmap region */ vm_paddr_t dmap_phys_max; /* The limit of the dmap region */ vm_offset_t dmap_max_addr; /* The virtual address limit of the dmap */ Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/sparc64/sparc64/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -100,11 +100,6 @@ __FBSDID("$FreeBSD$"); #include /* - * Virtual address of message buffer - */ -struct msgbuf *msgbufp; - -/* * Map of physical memory reagions */ vm_paddr_t phys_avail[128];