diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 11ff52b4b926..a0e193417be3 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.173 2011/12/12 19:03:08 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.174 2012/01/12 19:49:37 cherry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.173 2011/12/12 19:03:08 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.174 2012/01/12 19:49:37 cherry Exp $"); /* #define XENDEBUG_LOW */ @@ -1640,6 +1640,7 @@ init_x86_64(paddr_t first_avail) use_pae = 1; /* PAE always enabled in long mode */ #ifdef XEN + mutex_init(&pte_lock, MUTEX_DEFAULT, IPL_VM); pcb->pcb_cr3 = xen_start_info.pt_base - KERNBASE; __PRINTK(("pcb_cr3 0x%lx\n", xen_start_info.pt_base - KERNBASE)); #endif diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 38bb39dbc6a6..d6ea03fd34da 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.716 2012/01/12 19:37:45 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.717 2012/01/12 19:49:37 cherry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.716 2012/01/12 19:37:45 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717 2012/01/12 19:49:37 cherry Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -1408,6 +1408,8 @@ init386(paddr_t first_avail) * before the above variables are set. */ initgdt(NULL); + + mutex_init(&pte_lock, MUTEX_DEFAULT, IPL_VM); #endif /* XEN */ #if NISA > 0 || NPCI > 0 diff --git a/sys/arch/xen/x86/x86_xpmap.c b/sys/arch/xen/x86/x86_xpmap.c index ff8417387775..75e09fc0ddb8 100644 --- a/sys/arch/xen/x86/x86_xpmap.c +++ b/sys/arch/xen/x86/x86_xpmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: x86_xpmap.c,v 1.37 2012/01/09 13:04:13 cherry Exp $ */ +/* $NetBSD: x86_xpmap.c,v 1.38 2012/01/12 19:49:37 cherry Exp $ */ /* * Copyright (c) 2006 Mathieu Ropert @@ -69,7 +69,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.37 2012/01/09 13:04:13 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.38 2012/01/12 19:49:37 cherry Exp $"); #include "opt_xen.h" #include "opt_ddb.h" @@ -77,7 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.37 2012/01/09 13:04:13 cherry Exp $" #include #include -#include +#include #include @@ -653,8 +653,6 @@ bootstrap_again: /* Finally, flush TLB. */ xpq_queue_tlb_flush(); - mutex_init(&pte_lock, MUTEX_DEFAULT, IPL_VM); - return (init_tables + ((count + l2_4_count) * PAGE_SIZE)); }