PERFORCE change 31668 for review
Peter Wemm
peter at FreeBSD.org
Thu May 22 20:03:40 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31668
Change 31668 by peter at peter_hammer on 2003/05/22 20:03:02
reactivate pmap_object_init_pt()
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#10 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#10 (text+ko) ====
@@ -2254,8 +2254,7 @@
vm_object_t object, vm_pindex_t pindex,
vm_size_t size, int limit)
{
-#if 0
- vm_offset_t tmpidx;
+ vm_pindex_t tmpidx;
int psize;
vm_page_t p, mpte;
@@ -2271,14 +2270,12 @@
((addr & (NBPDR - 1)) == 0) && ((size & (NBPDR - 1)) == 0)) {
int i;
vm_page_t m[1];
- unsigned int ptepindex;
int npdes;
- pd_entry_t ptepa;
+ pd_entry_t ptepa, *pde;
- ptepindex = pmap_pde_pindex(addr);
- if (pmap->pm_pdir[ptepindex])
+ pde = pmap_pde(pmap, addr);
+ if (pde != 0 && (*pde & PG_V) != 0)
return;
-
retry:
p = vm_page_lookup(object, pindex);
if (p != NULL) {
@@ -2314,10 +2311,9 @@
pmap->pm_stats.resident_count += size >> PAGE_SHIFT;
npdes = size >> PDRSHIFT;
for(i = 0; i < npdes; i++) {
- pde_store(&pmap->pm_pdir[ptepindex],
- ptepa | PG_U | PG_RW | PG_V | PG_PS);
+ pde_store(pde, ptepa | PG_U | PG_RW | PG_V | PG_PS);
ptepa += NBPDR;
- ptepindex += 1;
+ pde++;
}
pmap_invalidate_all(kernel_pmap);
return;
@@ -2377,8 +2373,6 @@
}
vm_page_unlock_queues();
}
- return;
-#endif
}
/*
More information about the p4-projects
mailing list