Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Use pmap_bootstrap_palloc.



details:   https://anonhg.NetBSD.org/src/rev/8e46647844aa
branches:  trunk
changeset: 816493:8e46647844aa
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jul 09 09:25:44 2016 +0000

description:
Use pmap_bootstrap_palloc.

diffstat:

 sys/arch/x86/x86/pmap.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r e8a7b7805ada -r 8e46647844aa sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Sat Jul 09 08:05:46 2016 +0000
+++ b/sys/arch/x86/x86/pmap.c   Sat Jul 09 09:25:44 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $  */
+/*     $NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $  */
 
 /*-
  * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1399,8 +1399,7 @@
         * will still consider it active. So we set user PGD to this one to lift
         * all protection on the now inactive page tables set.
         */
-       xen_dummy_user_pgd = avail_start;
-       avail_start += PAGE_SIZE;
+       xen_dummy_user_pgd = pmap_bootstrap_palloc(1);
 
        /* Zero fill it, the less checks in Xen it requires the better */
        memset((void *) (xen_dummy_user_pgd + KERNBASE), 0, PAGE_SIZE);
@@ -1637,8 +1636,8 @@
        pdes = pmap_kernel()->pm_pdir;
        level = PTP_LEVELS;
        for (;;) {
-               newp = avail_start;
-               avail_start += PAGE_SIZE;
+               newp = pmap_bootstrap_palloc(1);
+
 #ifdef __HAVE_DIRECT_MAP
                memset((void *)PMAP_DIRECT_MAP(newp), 0, PAGE_SIZE);
 #else



Home | Main Index | Thread Index | Old Index