From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 20:28:38 2010 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 5A9721065676; Sat, 23 Jan 2010 20:28:38 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 305048FC1C; Sat, 23 Jan 2010 20:28:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NKScK1010998; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NKScOx010995; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001232028.o0NKScOx010995@svn.freebsd.org> From: Alan Cox Date: Sat, 23 Jan 2010 20:28:38 +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: r202897 - head/sys/amd64/amd64 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: Sat, 23 Jan 2010 20:28:38 -0000 Author: alc Date: Sat Jan 23 20:28:37 2010 New Revision: 202897 URL: http://svn.freebsd.org/changeset/base/202897 Log: Simplify the mapping of the system message buffer. Use the direct map just like ia64 does. Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/machdep.c Sat Jan 23 20:28:37 2010 (r202897) @@ -157,6 +157,8 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, extern vm_offset_t ksym_start, ksym_end; #endif +struct msgbuf *msgbufp; + /* Intel ICH registers */ #define ICH_PMBASE 0x400 #define ICH_SMI_EN ICH_PMBASE + 0x30 @@ -1275,7 +1277,7 @@ add_smap_entry(struct bios_smap *smap, v static void getmemsize(caddr_t kmdp, u_int64_t first) { - int i, off, physmap_idx, pa_indx, da_indx; + int i, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; u_long physmem_tunable; pt_entry_t *pte; @@ -1508,9 +1510,7 @@ do_next: phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); /* Map the message buffer. */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) - pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + - off); + msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); } u_int64_t Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/pmap.c Sat Jan 23 20:28:37 2010 (r202897) @@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$"); * and to when physical maps must be made correct. */ -#include "opt_msgbuf.h" #include "opt_pmap.h" #include "opt_vm.h" @@ -116,7 +115,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -206,7 +204,6 @@ static int shpgperproc = PMAP_SHPGPERPRO */ pt_entry_t *CMAP1 = 0; caddr_t CADDR1 = 0; -struct msgbuf *msgbufp = 0; /* * Crashdump maps. @@ -570,11 +567,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) - /* - * msgbufp is used to map the system message buffer. - */ - SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) - virtual_avail = va; *CMAP1 = 0;