summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/pmap.c16
-rw-r--r--sys/amd64/amd64/pmap.c16
-rw-r--r--sys/i386/i386/pmap.c16
-rw-r--r--sys/ia64/ia64/pmap.c16
4 files changed, 0 insertions, 64 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index 515dbb3..26861a2 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -747,8 +747,6 @@ pmap_extract(pmap_t pmap, vm_offset_t va)
vm_paddr_t pa;
pa = 0;
- if (pmap == NULL)
- return (pa);
PMAP_LOCK(pmap);
pte = pmap_lev3pte(pmap, va);
if (pte != NULL && pmap_pte_v(pte))
@@ -771,8 +769,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);
pte = pmap_lev3pte(pmap, va);
@@ -1468,9 +1464,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
{
vm_offset_t va, nva;
- if (pmap == NULL)
- return;
-
/*
* Perform an unsynchronized read. This is, however, safe.
*/
@@ -1586,9 +1579,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pt_entry_t* pte;
int newprot;
- if (pmap == NULL)
- return;
-
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
pmap_remove(pmap, sva, eva);
return;
@@ -1681,9 +1671,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
vm_page_t mpte;
int managed;
- if (pmap == NULL)
- return;
-
va &= ~PAGE_MASK;
#ifdef PMAP_DIAGNOSTIC
if (va > VM_MAX_KERNEL_ADDRESS)
@@ -1965,9 +1952,6 @@ pmap_change_wiring(pmap, va, wired)
{
pt_entry_t *pte;
- if (pmap == NULL)
- return;
-
PMAP_LOCK(pmap);
pte = pmap_lev3pte(pmap, va);
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.
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index b5b8da4..dbdeca0 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -827,8 +827,6 @@ pmap_extract(pmap_t pmap, vm_offset_t va)
pd_entry_t pde;
rtval = 0;
- if (pmap == NULL)
- return (rtval);
PMAP_LOCK(pmap);
pde = pmap->pm_pdir[va >> PDRSHIFT];
if (pde != 0) {
@@ -859,8 +857,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);
pde = *pmap_pde(pmap, va);
@@ -1630,9 +1626,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.
*/
@@ -1789,9 +1782,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pd_entry_t ptpaddr;
int anychanged;
- if (pmap == NULL)
- return;
-
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
pmap_remove(pmap, sva, eva);
return;
@@ -1894,9 +1884,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 &= PG_FRAME;
#ifdef PMAP_DIAGNOSTIC
if (va > VM_MAX_KERNEL_ADDRESS)
@@ -2264,9 +2251,6 @@ pmap_change_wiring(pmap, va, wired)
{
register pt_entry_t *pte;
- if (pmap == NULL)
- return;
-
PMAP_LOCK(pmap);
pte = pmap_pte(pmap, va);
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 8525dcb..5837f2c 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -950,8 +950,6 @@ pmap_extract(pmap_t pmap, vm_offset_t va)
vm_paddr_t pa;
pa = 0;
- if (pmap == NULL)
- return (pa);
PMAP_LOCK(pmap);
oldpmap = pmap_install(pmap);
pte = pmap_find_vhpt(va);
@@ -977,8 +975,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);
oldpmap = pmap_install(pmap);
@@ -1318,9 +1314,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
pv_entry_t npv, pv;
struct ia64_lpte *pte;
- if (pmap == NULL)
- return;
-
if (pmap->pm_stats.resident_count == 0)
return;
@@ -1430,9 +1423,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pmap_t oldpmap;
struct ia64_lpte *pte;
- if (pmap == NULL)
- return;
-
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
pmap_remove(pmap, sva, eva);
return;
@@ -1506,9 +1496,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
struct ia64_lpte *pte;
boolean_t managed;
- if (pmap == NULL)
- return;
-
vm_page_lock_queues();
PMAP_LOCK(pmap);
oldpmap = pmap_install(pmap);
@@ -1713,9 +1700,6 @@ pmap_change_wiring(pmap, va, wired)
pmap_t oldpmap;
struct ia64_lpte *pte;
- if (pmap == NULL)
- return;
-
PMAP_LOCK(pmap);
oldpmap = pmap_install(pmap);
OpenPOWER on IntegriCloud