diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index f4ba2934b63..91d85943a2d 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -216,9 +216,6 @@ __FBSDID("$FreeBSD$"); atomic_clear_int((u_int *)(pte), PG_W)) #define pmap_pte_set_prot(pte, v) ((*(int *)pte &= ~PG_PROT), (*(int *)pte |= (v))) -_Static_assert(sizeof(struct pmap) <= sizeof(struct pmap_KBI), - "pmap_KBI"); - static int pgeflag = 0; /* PG_G or-in */ static int pseflag = 0; /* PG_PS or-in */ diff --git a/sys/i386/i386/pmap_nopae.c b/sys/i386/i386/pmap_nopae.c index 6ab9906190e..0527e1cf62d 100644 --- a/sys/i386/i386/pmap_nopae.c +++ b/sys/i386/i386/pmap_nopae.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #define PMTYPE pmap_nopae_ +#define pm_pdir pm_pdir_nopae #include #include -_Static_assert(sizeof(struct pmap_KBI) >= sizeof(struct pmap), "pmap KBI"); #include "pmap.c" diff --git a/sys/i386/i386/pmap_pae.c b/sys/i386/i386/pmap_pae.c index f3872a33e5b..1e7abdccd31 100644 --- a/sys/i386/i386/pmap_pae.c +++ b/sys/i386/i386/pmap_pae.c @@ -43,7 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #define PMTYPE pmap_pae_ +#define pm_pdir pm_pdir_pae +#define pm_pdpt pm_pdpt_pae #include #include -_Static_assert(sizeof(struct pmap_KBI) >= sizeof(struct pmap), "pmap KBI"); #include "pmap.c" diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 7457a72f96d..3e76958a75e 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -166,30 +166,18 @@ struct md_page { int pat_mode; }; -#define PMAP_EXTERN_FIELDS \ - cpuset_t pm_active; /* active on cpus */ \ - struct mtx pm_mtx; \ - struct pmap_statistics pm_stats; /* pmap statistics */ - -struct pmap_KBI { - PMAP_EXTERN_FIELDS - int32_t pm_fill[32]; -}; - -#ifdef PMTYPE struct pmap { - PMAP_EXTERN_FIELDS - pd_entry_t *pm_pdir; /* KVA of page directory */ + cpuset_t pm_active; /* active on cpus */ + struct mtx pm_mtx; + struct pmap_statistics pm_stats; /* pmap statistics */ + uint32_t *pm_pdir_nopae; /* KVA of page directory */ + uint64_t *pm_pdir_pae; TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ LIST_ENTRY(pmap) pm_list; /* List of all pmaps */ - pdpt_entry_t *pm_pdpt; /* KVA of page directory pointer - table */ + uint64_t *pm_pdpt_pae; struct vm_radix pm_root; /* spare page table pages */ - vm_page_t pm_ptdpg[NPGPTD]; + vm_page_t pm_ptdpg[4]; /* PAE NPGPTD */ }; -#else -#define pmap pmap_KBI -#endif typedef struct pmap *pmap_t;