diff options
author | alc <alc@FreeBSD.org> | 2004-06-13 19:48:38 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-06-13 19:48:38 +0000 |
commit | 3a5f5107c8c699271e382ed4609af69cf504149f (patch) | |
tree | e648ff9814caa88278f64d48e1a942f2aeaca67c /sys/amd64 | |
parent | 9153ce36ebf50b77f60fef8dfeb82e916fd07711 (diff) | |
download | FreeBSD-src-3a5f5107c8c699271e382ed4609af69cf504149f.zip FreeBSD-src-3a5f5107c8c699271e382ed4609af69cf504149f.tar.gz |
Remove dead or unneeded code, e.g., spl calls.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6526987..b0e1103 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -142,7 +142,6 @@ __FBSDID("$FreeBSD$"); #include <machine/smp.h> #endif -#define PMAP_KEEP_PDIRS #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -208,8 +207,7 @@ static caddr_t crashdumpmap; static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(void); -static void pmap_clear_ptes(vm_page_t m, int bit) - __always_inline; +static void pmap_clear_ptes(vm_page_t m, int bit); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va); @@ -1336,13 +1334,11 @@ SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, void pmap_growkernel(vm_offset_t addr) { - int s; vm_paddr_t paddr; vm_page_t nkpg; pd_entry_t *pde, newpdir; pdp_entry_t newpdp; - s = splhigh(); mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { kernel_vm_end = KERNBASE; @@ -1390,7 +1386,6 @@ pmap_growkernel(vm_offset_t addr) kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); } - splx(s); } @@ -1439,9 +1434,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) { pv_entry_t pv; int rtval; - int s; - s = splvm(); mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->md.pv_list_count < pmap->pm_stats.resident_count) { TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { @@ -1467,7 +1460,6 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) free_pv_entry(pv); } - splx(s); return rtval; } @@ -1479,10 +1471,8 @@ static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m) { - int s; pv_entry_t pv; - s = splvm(); pv = get_pv_entry(); pv->pv_va = va; pv->pv_pmap = pmap; @@ -1494,7 +1484,6 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m) m->md.pv_list_count++; vm_page_unlock_queues(); - splx(s); } /* @@ -1674,7 +1663,6 @@ pmap_remove_all(vm_page_t m) { register pv_entry_t pv; pt_entry_t *pte, tpte; - int s; #if defined(PMAP_DIAGNOSTIC) /* @@ -1686,7 +1674,6 @@ pmap_remove_all(vm_page_t m) } #endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); - s = splvm(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pv->pv_pmap->pm_stats.resident_count--; pte = pmap_pte(pv->pv_pmap, pv->pv_va); @@ -1718,7 +1705,6 @@ pmap_remove_all(vm_page_t m) free_pv_entry(pv); } vm_page_flag_clear(m, PG_WRITEABLE); - splx(s); } /* @@ -2411,23 +2397,19 @@ pmap_page_exists_quick(pmap, m) { pv_entry_t pv; int loops = 0; - int s; if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; - s = splvm(); mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pv->pv_pmap == pmap) { - splx(s); return TRUE; } loops++; if (loops >= 16) break; } - splx(s); return (FALSE); } @@ -2448,7 +2430,6 @@ pmap_remove_pages(pmap, sva, eva) pt_entry_t *pte, tpte; vm_page_t m; pv_entry_t pv, npv; - int s; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { @@ -2457,7 +2438,6 @@ pmap_remove_pages(pmap, sva, eva) } #endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); - s = splvm(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_va >= eva || pv->pv_va < sva) { @@ -2517,7 +2497,6 @@ pmap_remove_pages(pmap, sva, eva) pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); free_pv_entry(pv); } - splx(s); pmap_invalidate_all(pmap); } @@ -2532,12 +2511,10 @@ pmap_is_modified(vm_page_t m) { pv_entry_t pv; pt_entry_t *pte; - int s; if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; - s = splvm(); mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { /* @@ -2555,11 +2532,9 @@ pmap_is_modified(vm_page_t m) #endif pte = pmap_pte(pv->pv_pmap, pv->pv_va); if (*pte & PG_M) { - splx(s); return TRUE; } } - splx(s); return (FALSE); } @@ -2592,13 +2567,11 @@ pmap_clear_ptes(vm_page_t m, int bit) { register pv_entry_t pv; pt_entry_t pbits, *pte; - int s; if (!pmap_initialized || (m->flags & PG_FICTITIOUS) || (bit == PG_RW && (m->flags & PG_WRITEABLE) == 0)) return; - s = splvm(); mtx_assert(&vm_page_queue_mtx, MA_OWNED); /* * Loop over all current mappings setting/clearing as appropos If @@ -2636,7 +2609,6 @@ pmap_clear_ptes(vm_page_t m, int bit) } if (bit == PG_RW) vm_page_flag_clear(m, PG_WRITEABLE); - splx(s); } /* @@ -2674,13 +2646,11 @@ pmap_ts_referenced(vm_page_t m) register pv_entry_t pv, pvf, pvn; pt_entry_t *pte; pt_entry_t v; - int s; int rtval = 0; if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return (rtval); - s = splvm(); mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { @@ -2709,7 +2679,6 @@ pmap_ts_referenced(vm_page_t m) } } while ((pv = pvn) != NULL && pv != pvf); } - splx(s); return (rtval); } |