diff options
author | alc <alc@FreeBSD.org> | 2004-08-27 19:06:17 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-08-27 19:06:17 +0000 |
commit | d0b59a4d47456fbe90d0bf53a5753f8f07dd19be (patch) | |
tree | 97b691cb3bfd9734b937ab2aa75b03f30bec25e9 /sys/amd64 | |
parent | 2581832493561dcf12eca4ff103a36e28466023d (diff) | |
download | FreeBSD-src-d0b59a4d47456fbe90d0bf53a5753f8f07dd19be.zip FreeBSD-src-d0b59a4d47456fbe90d0bf53a5753f8f07dd19be.tar.gz |
The machine-independent parts of the virtual memory system always pass a
valid pmap to the pmap functions that require one. Remove the checks for
NULL. (These checks have their origins in the Mach pmap.c that was
integrated into BSD. None of the new code written specifically for
FreeBSD included them.)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f3feccd..be37b00 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -786,8 +786,6 @@ pmap_extract(pmap_t pmap, vm_offset_t va) pd_entry_t pde, *pdep; rtval = 0; - if (pmap == NULL) - return (rtval); PMAP_LOCK(pmap); pdep = pmap_pde(pmap, va); if (pdep != NULL) { @@ -821,8 +819,6 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) vm_page_t m; m = NULL; - if (pmap == NULL) - return (m); vm_page_lock_queues(); PMAP_LOCK(pmap); pdep = pmap_pde(pmap, va); @@ -1563,9 +1559,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pt_entry_t *pte; int anyvalid; - if (pmap == NULL) - return; - /* * Perform an unsynchronized read. This is, however, safe. */ @@ -1737,9 +1730,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) pd_entry_t ptpaddr, *pde; int anychanged; - if (pmap == NULL) - return; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; @@ -1856,9 +1846,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, pt_entry_t origpte, newpte; vm_page_t mpte; - if (pmap == NULL) - return; - va = trunc_page(va); #ifdef PMAP_DIAGNOSTIC if (va > VM_MAX_KERNEL_ADDRESS) @@ -2211,9 +2198,6 @@ pmap_change_wiring(pmap, va, wired) { register pt_entry_t *pte; - if (pmap == NULL) - return; - /* * Wiring is not a hardware characteristic so there is no need to * invalidate TLB. |