PERFORCE change 145100 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Jul 12 15:01:44 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=145100
Change 145100 by gonzo at gonzo_jeeves on 2008/07/12 15:01:19
pmap.h is borked in mips2-jnpr, clean it up and merge changes from
HEAD by alc@
Affected files ...
.. //depot/projects/mips2/src/sys/mips/include/pmap.h#13 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/include/pmap.h#13 (text+ko) ====
@@ -90,7 +90,7 @@
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
* from: src/sys/i386/include/pmap.h,v 1.65.2.2 2000/11/30 01:54:42 peter
- * JNPR: pmap.h,v 1.7.2.1 2007/09/10 07:44:12 girish
+ * JNPR: pmap.h,v 1.7.2.1 2007/09/10 07:44:12
* $FreeBSD: src/sys/mips/include/pmap.h,v 1.3 2008/04/30 06:05:36 alc Exp $
*/
#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
@@ -104,6 +104,7 @@
#define KPTDI (VM_MIN_KERNEL_ADDRESS >> SEGSHIFT)
#define NUSERPGTBLS (VM_MAXUSER_ADDRESS >> SEGSHIFT)
+#ifdef _KERNEL
#ifndef LOCORE
#include <sys/queue.h>
@@ -111,7 +112,6 @@
#include <sys/_lock.h>
#include <sys/_mutex.h>
-
/*
* Pmap stuff
*/
@@ -129,13 +129,11 @@
#define ASID_BITS 8
#define ASIDGEN_BITS (32 - ASID_BITS)
#define ASIDGEN_MASK ((1 << ASIDGEN_BITS) - 1)
-};
struct pmap {
pd_entry_t *pm_segtab; /* KVA of segment table */
TAILQ_HEAD(, pv_entry)pm_pvlist; /* list of mappings in
* pmap */
- int pm_count; /* reference count */
int pm_active; /* active on cpus */
struct {
u_int32_t asid:ASID_BITS; /* TLB address space tag */
@@ -144,20 +142,9 @@
struct pmap_statistics pm_stats; /* pmap statistics */
struct vm_page *pm_ptphint; /* pmap ptp hint */
struct mtx pm_mtx;
+};
-struct pmap {
- pd_entry_t *pm_segtab; /* KVA of segment table */
- 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 */
- u_int32_t gen:ASIDGEN_BITS; /* its generation number */
- } pm_asid[MAXSMPCPU];
- struct pmap_statistics pm_stats; /* pmap statistics */
- struct vm_page *pm_ptphint; /* pmap ptp hint */
- struct mtx pm_mtx;
-};
+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);
@@ -182,8 +169,6 @@
#define PMAP_LGMEM_UNLOCK(sysmap) mtx_unlock(&(sysmap)->lock)
#define PMAP_LGMEM_DESTROY(sysmap) mtx_destroy(&(sysmap)->lock)
-#endif /* _KERNEL */
-
/*
* For each vm_page_t, there is a list of all currently valid virtual
* mappings of that page. An entry is a pv_entry_t, the list is pv_table.
@@ -197,36 +182,6 @@
boolean_t pv_wired; /* whether this entry is wired */
} *pv_entry_t;
-#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list))
-
-#ifdef _KERNEL
-
-#if defined(DIAGNOSTIC)
-#define PMAP_DIAGNOSTIC
-#endif
-
-#if !defined(PMAP_DIAGNOSTIC)
-#define PMAP_INLINE __inline
-#else
-#define PMAP_INLINE
-#endif
-
-extern vm_offset_t avail_end;
-extern vm_offset_t avail_start;
-extern vm_offset_t clean_eva;
-extern vm_offset_t clean_sva;
-extern vm_offset_t phys_avail[];
-extern char *ptvmmap; /* poor name! */
-extern vm_offset_t virtual_avail;
-extern vm_offset_t virtual_end;
-extern pd_entry_t *segbase;
-
-extern vm_paddr_t mips_wired_tlb_physmem_start;
-extern vm_paddr_t mips_wired_tlb_physmem_end;
-extern u_int need_wired_tlb_page_pool;
-
-
-#ifdef _KERNEL
#if defined(DIAGNOSTIC)
#define PMAP_DIAGNOSTIC
More information about the p4-projects
mailing list