diff options
author | dfr <dfr@FreeBSD.org> | 2001-10-19 09:47:02 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-10-19 09:47:02 +0000 |
commit | 220747715aa1f55e0ee13e19b3ecf64ce9d44327 (patch) | |
tree | bf9e17deff403f2fe82fe492fff8cd49650b22f9 /sys/ia64/include/pmap.h | |
parent | bdd378dcf8a5030d7afacc760c456518a0f68edf (diff) | |
download | FreeBSD-src-220747715aa1f55e0ee13e19b3ecf64ce9d44327.zip FreeBSD-src-220747715aa1f55e0ee13e19b3ecf64ce9d44327.tar.gz |
Rework pmap so that it separates the PTE structure from the pv_entry
structure. This makes it possible to pre-allocate PTEs for the kernel,
which is necessary for a reliable implementation of pmap_kenter(). This
also avoids wasting space (about 48 bytes per page) for kernel mappings
and user mappings of memory-mapped devices.
This also fixes a bug with the previous version where the implementation
required the pv_entry structure to be physically contiguous but did not
enforce this (the structure size was not a power of two). This meant
that the pv_entry free list was quickly corrupted as soon as the system
was even mildly loaded.
Diffstat (limited to 'sys/ia64/include/pmap.h')
-rw-r--r-- | sys/ia64/include/pmap.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h index e7fd258..0aa9a46 100644 --- a/sys/ia64/include/pmap.h +++ b/sys/ia64/include/pmap.h @@ -54,6 +54,12 @@ #ifdef _KERNEL +#ifndef NKPT +#define NKPT 30 /* initial number of kernel page tables */ +#endif +#define MAXKPT (PAGE_SIZE/sizeof(vm_offset_t)) + + /* * Routine: pmap_kextract * Function: @@ -106,7 +112,6 @@ extern pmap_t kernel_pmap; * mappings of that page. An entry is a pv_entry_t, the list is pv_table. */ typedef struct pv_entry { - struct ia64_lpte pv_pte; /* pte for collision walker */ pmap_t pv_pmap; /* pmap where mapping lies */ vm_offset_t pv_va; /* virtual address for mapping */ TAILQ_ENTRY(pv_entry) pv_list; |