summaryrefslogtreecommitdiffstats
path: root/sys/mips/include/pmap.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-05-02 06:12:38 +0000
committeralc <alc@FreeBSD.org>2009-05-02 06:12:38 +0000
commit043d69b8a21d72865c970109145bd7ae2900dbc0 (patch)
tree98dd85c9633c4c866188f606fd10a3b47804f3b3 /sys/mips/include/pmap.h
parentd4df3d2519922e424f58ad340ea2ab9df3faff71 (diff)
downloadFreeBSD-src-043d69b8a21d72865c970109145bd7ae2900dbc0.zip
FreeBSD-src-043d69b8a21d72865c970109145bd7ae2900dbc0.tar.gz
A variety of changes:
Reimplement "kernel_pmap" in the standard way. Eliminate unused variables. (These are mostly variables that were discarded by the machine-independent layer after FreeBSD 4.x.) Properly handle a vm_page_alloc() failure in pmap_init(). Eliminate dead or legacy (FreeBSD 4.x) code. Eliminate unnecessary page queues locking. Eliminate some excess white space. Correct the synchronization of pmap_page_exists_quick(). Tested by: gonzo
Diffstat (limited to 'sys/mips/include/pmap.h')
-rw-r--r--sys/mips/include/pmap.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/mips/include/pmap.h b/sys/mips/include/pmap.h
index e6c20c5..2979f3b 100644
--- a/sys/mips/include/pmap.h
+++ b/sys/mips/include/pmap.h
@@ -74,7 +74,7 @@ struct pv_entry;
struct md_page {
int pv_list_count;
int pv_flags;
- TAILQ_HEAD(, pv_entry)pv_list;
+ TAILQ_HEAD(, pv_entry) pv_list;
};
#define PV_TABLE_MOD 0x01 /* modified */
@@ -86,8 +86,8 @@ struct md_page {
struct pmap {
pd_entry_t *pm_segtab; /* KVA of segment table */
- TAILQ_HEAD(, pv_entry)pm_pvlist; /* list of mappings in
- * pmap */
+ TAILQ_HEAD(, pv_entry) pm_pvlist; /* list of mappings in
+ * pmap */
int pm_active; /* active on cpus */
struct {
u_int32_t asid:ASID_BITS; /* TLB address space tag */
@@ -105,10 +105,12 @@ typedef struct pmap *pmap_t;
pt_entry_t *pmap_pte(pmap_t, vm_offset_t);
pd_entry_t pmap_segmap(pmap_t pmap, vm_offset_t va);
vm_offset_t pmap_kextract(vm_offset_t va);
-extern pmap_t kernel_pmap;
#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
+extern struct pmap kernel_pmap_store;
+#define kernel_pmap (&kernel_pmap_store)
+
#define PMAP_LOCK(pmap) mtx_lock(&(pmap)->pm_mtx)
#define PMAP_LOCK_ASSERT(pmap, type) mtx_assert(&(pmap)->pm_mtx, (type))
#define PMAP_LOCK_DESTROY(pmap) mtx_destroy(&(pmap)->pm_mtx)
@@ -132,8 +134,8 @@ extern pmap_t kernel_pmap;
typedef struct pv_entry {
pmap_t pv_pmap; /* pmap where mapping lies */
vm_offset_t pv_va; /* virtual address for mapping */
- TAILQ_ENTRY(pv_entry)pv_list;
- TAILQ_ENTRY(pv_entry)pv_plist;
+ TAILQ_ENTRY(pv_entry) pv_list;
+ TAILQ_ENTRY(pv_entry) pv_plist;
vm_page_t pv_ptem; /* VM page for pte */
boolean_t pv_wired; /* whether this entry is wired */
} *pv_entry_t;
@@ -143,8 +145,6 @@ typedef struct pv_entry {
#define PMAP_DIAGNOSTIC
#endif
-extern vm_offset_t avail_end;
-extern vm_offset_t avail_start;
extern vm_offset_t phys_avail[];
extern char *ptvmmap; /* poor name! */
extern vm_offset_t virtual_avail;
OpenPOWER on IntegriCloud