diff options
-rw-r--r-- | sys/arch/sh/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/pmap.h | 34 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 6 |
3 files changed, 25 insertions, 21 deletions
diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h index 8abdbfe1d25..44bb8fec842 100644 --- a/sys/arch/sh/include/pmap.h +++ b/sys/arch/sh/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.3 2007/09/10 18:49:45 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.4 2007/12/15 17:24:06 deraadt Exp $ */ /* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */ /*- @@ -49,6 +49,8 @@ #include <sys/queue.h> #include <sh/pte.h> +#ifdef _KERNEL + #define PMAP_STEAL_MEMORY #define PMAP_GROWKERNEL @@ -98,4 +100,6 @@ void pmap_prefer(vaddr_t, vaddr_t *); pt_entry_t *__pmap_pte_lookup(pmap_t, vaddr_t); pt_entry_t *__pmap_kpte_lookup(vaddr_t); boolean_t __pmap_pte_load(pmap_t, vaddr_t, int); + +#endif /* !_KERNEL */ #endif /* !_SH_PMAP_H_ */ diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h index 449c5b6eb6e..e1a044208a5 100644 --- a/sys/arch/sparc/include/pmap.h +++ b/sys/arch/sparc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.42 2007/09/10 18:49:45 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.43 2007/12/15 17:24:07 deraadt Exp $ */ /* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */ /* @@ -127,6 +127,22 @@ #define NKREG ((int)((-(unsigned)VM_MIN_KERNEL_ADDRESS) / NBPRG)) /* 8 */ #define NUREG (256 - NKREG) /* 248 */ +struct regmap { + struct segmap *rg_segmap; /* point to NSGPRG PMEGs */ + int *rg_seg_ptps; /* SRMMU-edible segment tables (NULL + * indicates invalid region (4m) */ + smeg_t rg_smeg; /* the MMU region number (4c) */ + u_char rg_nsegmap; /* number of valid PMEGS */ +}; + +struct segmap { + int *sg_pte; /* points to NPTESG PTEs */ + pmeg_t sg_pmeg; /* the MMU segment number (4c) */ + u_char sg_npte; /* number of valid PTEs per seg */ +}; + +#ifdef _KERNEL + TAILQ_HEAD(mmuhd,mmuentry); /* @@ -157,20 +173,6 @@ struct pmap { struct pmap_statistics pm_stats; /* pmap statistics */ }; -struct regmap { - struct segmap *rg_segmap; /* point to NSGPRG PMEGs */ - int *rg_seg_ptps; /* SRMMU-edible segment tables (NULL - * indicates invalid region (4m) */ - smeg_t rg_smeg; /* the MMU region number (4c) */ - u_char rg_nsegmap; /* number of valid PMEGS */ -}; - -struct segmap { - int *sg_pte; /* points to NPTESG PTEs */ - pmeg_t sg_pmeg; /* the MMU segment number (4c) */ - u_char sg_npte; /* number of valid PTEs per seg */ -}; - typedef struct pmap *pmap_t; /* @@ -214,8 +216,6 @@ struct kvm_cpustate { }/*not yet used*/; #endif -#ifdef _KERNEL - #define PMAP_NULL ((pmap_t)0) extern struct pmap kernel_pmap_store; diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index a5b0ff7f5f2..2388a77b77b 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.28 2007/04/22 10:05:51 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.29 2007/12/15 17:24:07 deraadt Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -43,6 +43,8 @@ #ifndef PMAP_H #define PMAP_H +#ifdef _KERNEL + #include <machine/pte.h> #include <machine/mtpr.h> #include <machine/pcb.h> @@ -96,8 +98,6 @@ struct pv_entry { (paddr_t)ptr = avail_start + KERNBASE; \ avail_start += (count) * VAX_NBPG; -#ifdef _KERNEL - extern struct pmap kernel_pmap_store; #define pmap_kernel() (&kernel_pmap_store) |