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_valloc and pmap_bootstra...



details:   https://anonhg.NetBSD.org/src/rev/16b3ebaa1de0
branches:  trunk
changeset: 346207:16b3ebaa1de0
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jul 01 11:44:05 2016 +0000

description:
Use pmap_bootstrap_valloc and pmap_bootstrap_palloc under XEN at least
once, for these not to appear as unused functions (not tested, but I
guess).

diffstat:

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

diffs (37 lines):

diff -r 73a0887e2c64 -r 16b3ebaa1de0 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Fri Jul 01 11:39:45 2016 +0000
+++ b/sys/arch/x86/x86/pmap.c   Fri Jul 01 11:44:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.201 2016/07/01 11:39:45 maxv Exp $  */
+/*     $NetBSD: pmap.c,v 1.202 2016/07/01 11:44:05 maxv Exp $  */
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.201 2016/07/01 11:39:45 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.202 2016/07/01 11:44:05 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1426,14 +1426,12 @@
        /* Pin as L4 */
        xpq_queue_pin_l4_table(xpmap_ptom_masked(xen_dummy_user_pgd));
 #endif /* __x86_64__ */
-       idt_vaddr = virtual_avail;                      /* don't need pte */
-       idt_paddr = avail_start;                        /* steal a page */
        /*
-        * Xen require one more page as we can't store
-        * GDT and LDT on the same page
+        * Xen requires one more page as we can't store GDT and LDT on the same
+        * page.
         */
-       virtual_avail += 3 * PAGE_SIZE;
-       avail_start += 3 * PAGE_SIZE;
+       idt_vaddr = pmap_bootstrap_valloc(3);
+       idt_paddr = pmap_bootstrap_palloc(3);
 #else /* XEN */
 
 #if defined(__x86_64__)



Home | Main Index | Thread Index | Old Index