PERFORCE change 31674 for review
Peter Wemm
peter at FreeBSD.org
Thu May 22 21:04:59 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31674
Change 31674 by peter at peter_hammer on 2003/05/22 21:04:40
use vm_pindex_t (uint64_t) for page indexes since multi-terrabyte
VM is on the way.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#13 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#13 (text+ko) ====
@@ -217,7 +217,7 @@
static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va);
-static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex);
+static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex);
static vm_page_t pmap_page_lookup(vm_object_t object, vm_pindex_t pindex);
static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t);
static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
@@ -246,7 +246,7 @@
/********************/
/* Return a non-clipped PD index for a given VA */
-static __inline unsigned long
+static __inline vm_pindex_t
pmap_pde_pindex(vm_offset_t va)
{
return va >> PDRSHIFT;
@@ -254,28 +254,28 @@
/* Return various clipped indexes for a given VA */
-static __inline int
+static __inline vm_pindex_t
pmap_pte_index(vm_offset_t va)
{
return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1));
}
-static __inline int
+static __inline vm_pindex_t
pmap_pde_index(vm_offset_t va)
{
return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1));
}
-static __inline int
+static __inline vm_pindex_t
pmap_pdpe_index(vm_offset_t va)
{
return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1));
}
-static __inline int
+static __inline vm_pindex_t
pmap_pml4e_index(vm_offset_t va)
{
@@ -1185,7 +1185,7 @@
static int
pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t mpte)
{
- unsigned long ptepindex;
+ vm_pindex_t ptepindex;
if (va >= VM_MAXUSER_ADDRESS)
return 0;
@@ -1286,7 +1286,7 @@
static vm_page_t
_pmap_allocpte(pmap, ptepindex)
pmap_t pmap;
- unsigned ptepindex;
+ vm_pindex_t ptepindex;
{
vm_page_t m, pdppg, pdpg;
@@ -1314,7 +1314,7 @@
if (ptepindex >= (NUPDE + NUPDPE)) {
pml4_entry_t *pml4;
- unsigned pml4index;
+ vm_pindex_t pml4index;
/* Wire up a new PDPE page */
pml4index = ptepindex - (NUPDE + NUPDPE);
@@ -1322,8 +1322,8 @@
*pml4 = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M;
} else if (ptepindex >= NUPDE) {
- unsigned pml4index;
- unsigned pdpindex;
+ vm_pindex_t pml4index;
+ vm_pindex_t pdpindex;
pml4_entry_t *pml4;
pdp_entry_t *pdp;
@@ -1347,8 +1347,8 @@
*pdp = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M;
} else {
- unsigned pml4index;
- unsigned pdpindex;
+ vm_pindex_t pml4index;
+ vm_pindex_t pdpindex;
pml4_entry_t *pml4;
pdp_entry_t *pdp;
pd_entry_t *pd;
@@ -1401,7 +1401,7 @@
static vm_page_t
pmap_allocpte(pmap_t pmap, vm_offset_t va)
{
- unsigned long ptepindex;
+ vm_pindex_t ptepindex;
pd_entry_t *pd;
vm_page_t m;
@@ -2158,7 +2158,7 @@
* resident, we are creating it here.
*/
if (va < VM_MAXUSER_ADDRESS) {
- unsigned ptepindex;
+ vm_pindex_t ptepindex;
pd_entry_t *ptepa;
/*
@@ -2545,7 +2545,7 @@
pt_entry_t *src_pte, *dst_pte;
vm_page_t dstmpte, srcmpte;
pd_entry_t srcptepaddr, *pde;
- unsigned ptepindex;
+ vm_pindex_t ptepindex;
if (addr >= UPT_MIN_ADDRESS)
panic("pmap_copy: invalid to pmap_copy page tables\n");
More information about the p4-projects
mailing list