1 1.42 rin /* $NetBSD: pmap.h,v 1.42 2022/05/07 07:10:46 rin Exp $ */ 2 1.1 ws 3 1.37 matt #ifndef _POWERPC_PMAP_H_ 4 1.37 matt #define _POWERPC_PMAP_H_ 5 1.37 matt 6 1.30 matt #ifdef _KERNEL_OPT 7 1.30 matt #include "opt_ppcarch.h" 8 1.37 matt #include "opt_modular.h" 9 1.30 matt #endif 10 1.30 matt 11 1.37 matt #if !defined(_MODULE) 12 1.37 matt 13 1.37 matt #if defined(PPC_BOOKE) 14 1.37 matt #include <powerpc/booke/pmap.h> 15 1.37 matt #elif defined(PPC_IBM4XX) 16 1.30 matt #include <powerpc/ibm4xx/pmap.h> 17 1.33 sanjayl #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE) 18 1.30 matt #include <powerpc/oea/pmap.h> 19 1.38 matt #elif defined(_KERNEL) 20 1.36 matt #error unknown PPC variant 21 1.30 matt #endif 22 1.37 matt 23 1.37 matt #endif /* !_MODULE */ 24 1.37 matt 25 1.37 matt #if !defined(_LOCORE) && (defined(MODULAR) || defined(_MODULE)) 26 1.37 matt /* 27 1.37 matt * Both BOOKE and OEA use __HAVE_VM_PAGE_MD but IBM4XX doesn't so define 28 1.37 matt * a compatible vm_page_md so that struct vm_page is the same size for all 29 1.37 matt * PPC variants. 30 1.37 matt */ 31 1.37 matt #ifndef __HAVE_VM_PAGE_MD 32 1.37 matt #define __HAVE_VM_PAGE_MD 33 1.39 rin #define VM_MDPAGE_INIT(pg) __nothing 34 1.37 matt 35 1.37 matt struct vm_page_md { 36 1.37 matt uintptr_t mdpg_dummy[5]; 37 1.37 matt }; 38 1.40 rin #endif /* !__HAVE_VM_PAGE_MD */ 39 1.37 matt 40 1.37 matt __CTASSERT(sizeof(struct vm_page_md) == sizeof(uintptr_t)*5); 41 1.37 matt 42 1.42 rin #ifndef __HAVE_PMAP_PV_TRACK 43 1.42 rin /* 44 1.42 rin * We need empty stubs for modules shared with all sub-archs. 45 1.42 rin */ 46 1.42 rin #define __HAVE_PMAP_PV_TRACK 47 1.42 rin #define PMAP_PV_TRACK_ONLY_STUBS 48 1.42 rin #include <uvm/pmap/pmap_pvt.h> 49 1.42 rin #endif /* !__HAVE_PMAP_PV_TRACK */ 50 1.42 rin 51 1.37 matt #endif /* !LOCORE && (MODULAR || _MODULE) */ 52 1.37 matt 53 1.37 matt #endif /* !_POWERPC_PMAP_H_ */ 54