diff options
author | Justus Winter <justus@gnupg.org> | 2017-08-14 19:07:32 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-14 21:49:06 +0200 |
commit | 7913f633c6fea18d8c6683ad465617d54c9eb535 (patch) | |
tree | dab870dae255b536ce37f43613910eed070f8355 /i386/intel | |
parent | 5aba22e3c66bb1fa5925e7ce976f436a48ec16b7 (diff) | |
download | gnumach-7913f633c6fea18d8c6683ad465617d54c9eb535.tar.gz gnumach-7913f633c6fea18d8c6683ad465617d54c9eb535.tar.bz2 gnumach-7913f633c6fea18d8c6683ad465617d54c9eb535.zip |
i386: Fix pmap_remove on PAE kernels.
* i386/intel/pmap.c (pmap_remove): Fix iteration over page directory.
(pmap_enter): Explain why it is ok here.
Diffstat (limited to 'i386/intel')
-rw-r--r-- | i386/intel/pmap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 5af376d7..2a53fb67 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -1533,7 +1533,6 @@ void pmap_remove( vm_offset_t e) { int spl; - pt_entry_t *pde; pt_entry_t *spte, *epte; vm_offset_t l; vm_offset_t _s = s; @@ -1543,8 +1542,9 @@ void pmap_remove( PMAP_READ_LOCK(map, spl); - pde = pmap_pde(map, s); while (s < e) { + pt_entry_t *pde = pmap_pde(map, s); + l = (s + PDE_MAPPED_SIZE) & ~(PDE_MAPPED_SIZE-1); if (l > e) l = e; @@ -1555,7 +1555,6 @@ void pmap_remove( pmap_remove_range(map, s, spte, epte); } s = l; - pde++; } PMAP_UPDATE_TLBS(map, _s, e); @@ -1953,7 +1952,6 @@ Retry: * Enter the new page table page in the page directory. */ i = ptes_per_vm_page; - /*XX pdp = &pmap->dirbase[pdenum(v) & ~(i-1)];*/ pdp = pmap_pde(pmap, v); do { #ifdef MACH_PV_PAGETABLES @@ -1970,7 +1968,7 @@ Retry: | INTEL_PTE_USER | INTEL_PTE_WRITE; #endif /* MACH_PV_PAGETABLES */ - pdp++; + pdp++; /* Note: This is safe b/c we stay in one page. */ ptp += INTEL_PGBYTES; } while (--i > 0); |