svn commit: r269485 - in head: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/i386/i386 sys/i386/xen sys/mips/mips sys/powerpc/aim sys/powerpc/booke sys/powerpc/powerpc sys/sparc64/sparc64 sys/vm
Alan Cox
alc at FreeBSD.org
Sun Aug 3 20:40:55 UTC 2014
Author: alc
Date: Sun Aug 3 20:40:51 2014
New Revision: 269485
URL: http://svnweb.freebsd.org/changeset/base/269485
Log:
Retire pmap_change_wiring(). We have never used it to wire virtual pages.
We continue to use pmap_enter() for that. For unwiring virtual pages, we
now use pmap_unwire(), which unwires a range of virtual addresses instead
of a single virtual page.
Sponsored by: EMC / Isilon Storage Division
Deleted:
head/share/man/man9/pmap_change_wiring.9
Modified:
head/ObsoleteFiles.inc
head/share/man/man9/Makefile
head/share/man/man9/pmap.9
head/sys/amd64/amd64/pmap.c
head/sys/arm/arm/pmap-v6.c
head/sys/arm/arm/pmap.c
head/sys/i386/i386/pmap.c
head/sys/i386/xen/pmap.c
head/sys/mips/mips/pmap.c
head/sys/powerpc/aim/mmu_oea.c
head/sys/powerpc/aim/mmu_oea64.c
head/sys/powerpc/booke/pmap.c
head/sys/powerpc/powerpc/mmu_if.m
head/sys/powerpc/powerpc/pmap_dispatch.c
head/sys/sparc64/sparc64/pmap.c
head/sys/vm/pmap.h
Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc Sun Aug 3 18:39:11 2014 (r269484)
+++ head/ObsoleteFiles.inc Sun Aug 3 20:40:51 2014 (r269485)
@@ -38,6 +38,8 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20140803: Remove an obsolete man page
+OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz
# 20140728: libsbuf restored to old version.
OLD_LIBS+=lib/libsbuf.so.7
# 20140728: Remove an obsolete man page
Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile Sun Aug 3 18:39:11 2014 (r269484)
+++ head/share/man/man9/Makefile Sun Aug 3 20:40:51 2014 (r269485)
@@ -199,7 +199,6 @@ MAN= accept_filter.9 \
physio.9 \
pmap.9 \
pmap_activate.9 \
- pmap_change_wiring.9 \
pmap_clear_modify.9 \
pmap_copy.9 \
pmap_enter.9 \
Modified: head/share/man/man9/pmap.9
==============================================================================
--- head/share/man/man9/pmap.9 Sun Aug 3 18:39:11 2014 (r269484)
+++ head/share/man/man9/pmap.9 Sun Aug 3 20:40:51 2014 (r269485)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 18, 2014
+.Dd August 3, 2014
.Dt PMAP 9
.Os
.Sh NAME
@@ -89,7 +89,6 @@ operation.
.Sh SEE ALSO
.Xr pmap 9 ,
.Xr pmap_activate 9 ,
-.Xr pmap_change_wiring 9 ,
.Xr pmap_clear_modify 9 ,
.Xr pmap_copy 9 ,
.Xr pmap_copy_page 9 ,
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/amd64/amd64/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -4693,58 +4693,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offs
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- pd_entry_t *pde;
- pt_entry_t *pte;
- boolean_t pv_lists_locked;
-
- pv_lists_locked = FALSE;
-
- /*
- * Wiring is not a hardware characteristic so there is no need to
- * invalidate TLB.
- */
-retry:
- PMAP_LOCK(pmap);
- pde = pmap_pde(pmap, va);
- if ((*pde & PG_PS) != 0) {
- if (!wired != ((*pde & PG_W) == 0)) {
- if (!pv_lists_locked) {
- pv_lists_locked = TRUE;
- if (!rw_try_rlock(&pvh_global_lock)) {
- PMAP_UNLOCK(pmap);
- rw_rlock(&pvh_global_lock);
- goto retry;
- }
- }
- if (!pmap_demote_pde(pmap, pde, va))
- panic("pmap_change_wiring: demotion failed");
- } else
- goto out;
- }
- pte = pmap_pde_to_pte(pde, va);
- if (wired && (*pte & PG_W) == 0) {
- pmap->pm_stats.wired_count++;
- atomic_set_long(pte, PG_W);
- } else if (!wired && (*pte & PG_W) != 0) {
- pmap->pm_stats.wired_count--;
- atomic_clear_long(pte, PG_W);
- }
-out:
- if (pv_lists_locked)
- rw_runlock(&pvh_global_lock);
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/arm/arm/pmap-v6.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -3253,56 +3253,6 @@ pmap_enter_quick(pmap_t pmap, vm_offset_
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- struct l2_bucket *l2b;
- struct md_page *pvh;
- struct pv_entry *pve;
- pd_entry_t *pl1pd, l1pd;
- pt_entry_t *ptep, pte;
- vm_page_t m;
-
- rw_wlock(&pvh_global_lock);
- PMAP_LOCK(pmap);
- pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)];
- l1pd = *pl1pd;
- if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) {
- m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME);
- KASSERT((m != NULL) && ((m->oflags & VPO_UNMANAGED) == 0),
- ("pmap_change_wiring: unmanaged superpage should not "
- "be changed"));
- KASSERT(pmap != pmap_kernel(),
- ("pmap_change_wiring: managed kernel superpage "
- "should not exist"));
- pvh = pa_to_pvh(l1pd & L1_S_FRAME);
- pve = pmap_find_pv(pvh, pmap, trunc_1mpage(va));
- if (!wired != ((pve->pv_flags & PVF_WIRED) == 0)) {
- if (!pmap_demote_section(pmap, va))
- panic("pmap_change_wiring: demotion failed");
- } else
- goto out;
- }
- l2b = pmap_get_l2_bucket(pmap, va);
- KASSERT(l2b, ("No l2b bucket in pmap_change_wiring"));
- ptep = &l2b->l2b_kva[l2pte_index(va)];
- pte = *ptep;
- m = PHYS_TO_VM_PAGE(l2pte_pa(pte));
- if (m != NULL)
- pmap_modify_pv(m, pmap, va, PVF_WIRED,
- wired == TRUE ? PVF_WIRED : 0);
-out:
- rw_wunlock(&pvh_global_lock);
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/arm/arm/pmap.c
==============================================================================
--- head/sys/arm/arm/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/arm/arm/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -3544,33 +3544,6 @@ pmap_enter_quick(pmap_t pmap, vm_offset_
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- struct l2_bucket *l2b;
- pt_entry_t *ptep, pte;
- vm_page_t pg;
-
- rw_wlock(&pvh_global_lock);
- PMAP_LOCK(pmap);
- l2b = pmap_get_l2_bucket(pmap, va);
- KASSERT(l2b, ("No l2b bucket in pmap_change_wiring"));
- ptep = &l2b->l2b_kva[l2pte_index(va)];
- pte = *ptep;
- pg = PHYS_TO_VM_PAGE(l2pte_pa(pte));
- if (pg)
- pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired ? PVF_WIRED : 0);
- rw_wunlock(&pvh_global_lock);
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/i386/i386/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -3968,58 +3968,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offs
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- pd_entry_t *pde;
- pt_entry_t *pte;
- boolean_t are_queues_locked;
-
- are_queues_locked = FALSE;
-retry:
- PMAP_LOCK(pmap);
- pde = pmap_pde(pmap, va);
- if ((*pde & PG_PS) != 0) {
- if (!wired != ((*pde & PG_W) == 0)) {
- if (!are_queues_locked) {
- are_queues_locked = TRUE;
- if (!rw_try_wlock(&pvh_global_lock)) {
- PMAP_UNLOCK(pmap);
- rw_wlock(&pvh_global_lock);
- goto retry;
- }
- }
- if (!pmap_demote_pde(pmap, pde, va))
- panic("pmap_change_wiring: demotion failed");
- } else
- goto out;
- }
- pte = pmap_pte(pmap, va);
-
- if (wired && !pmap_pte_w(pte))
- pmap->pm_stats.wired_count++;
- else if (!wired && pmap_pte_w(pte))
- pmap->pm_stats.wired_count--;
-
- /*
- * Wiring is not a hardware characteristic so there is no need to
- * invalidate TLB.
- */
- pmap_pte_set_w(pte, wired);
- pmap_pte_release(pte);
-out:
- if (are_queues_locked)
- rw_wunlock(&pvh_global_lock);
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/i386/xen/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -3167,39 +3167,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offs
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- pt_entry_t *pte;
-
- rw_wlock(&pvh_global_lock);
- PMAP_LOCK(pmap);
- pte = pmap_pte(pmap, va);
-
- if (wired && !pmap_pte_w(pte)) {
- PT_SET_VA_MA((pte), *(pte) | PG_W, TRUE);
- pmap->pm_stats.wired_count++;
- } else if (!wired && pmap_pte_w(pte)) {
- PT_SET_VA_MA((pte), *(pte) & ~PG_W, TRUE);
- pmap->pm_stats.wired_count--;
- }
-
- /*
- * Wiring is not a hardware characteristic so there is no need to
- * invalidate TLB.
- */
- pmap_pte_release(pte);
- PMAP_UNLOCK(pmap);
- rw_wunlock(&pvh_global_lock);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/mips/mips/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -2425,37 +2425,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offs
}
/*
- * Routine: pmap_change_wiring
- * Function: Change the wiring attribute for a map/virtual-address
- * pair.
- * In/out conditions:
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- pt_entry_t *pte;
-
- PMAP_LOCK(pmap);
- pte = pmap_pte(pmap, va);
-
- if (wired && !pte_test(pte, PTE_W))
- pmap->pm_stats.wired_count++;
- else if (!wired && pte_test(pte, PTE_W))
- pmap->pm_stats.wired_count--;
-
- /*
- * Wiring is not a hardware characteristic so there is no need to
- * invalidate TLB.
- */
- if (wired)
- pte_set(pte, PTE_W);
- else
- pte_clear(pte, PTE_W);
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range
* must have the wired attribute set. In contrast, invalid mappings
Modified: head/sys/powerpc/aim/mmu_oea.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/powerpc/aim/mmu_oea.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -269,7 +269,6 @@ int moea_pte_spill(vm_offset_t);
/*
* Kernel MMU interface
*/
-void moea_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t);
void moea_clear_modify(mmu_t, vm_page_t);
void moea_copy_page(mmu_t, vm_page_t, vm_page_t);
void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset,
@@ -319,7 +318,6 @@ vm_offset_t moea_dumpsys_map(mmu_t mmu,
struct pmap_md * moea_scan_md(mmu_t mmu, struct pmap_md *prev);
static mmu_method_t moea_methods[] = {
- MMUMETHOD(mmu_change_wiring, moea_change_wiring),
MMUMETHOD(mmu_clear_modify, moea_clear_modify),
MMUMETHOD(mmu_copy_page, moea_copy_page),
MMUMETHOD(mmu_copy_pages, moea_copy_pages),
@@ -1016,28 +1014,6 @@ moea_deactivate(mmu_t mmu, struct thread
}
void
-moea_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired)
-{
- struct pvo_entry *pvo;
-
- PMAP_LOCK(pm);
- pvo = moea_pvo_find_va(pm, va & ~ADDR_POFF, NULL);
-
- if (pvo != NULL) {
- if (wired) {
- if ((pvo->pvo_vaddr & PVO_WIRED) == 0)
- pm->pm_stats.wired_count++;
- pvo->pvo_vaddr |= PVO_WIRED;
- } else {
- if ((pvo->pvo_vaddr & PVO_WIRED) != 0)
- pm->pm_stats.wired_count--;
- pvo->pvo_vaddr &= ~PVO_WIRED;
- }
- }
- PMAP_UNLOCK(pm);
-}
-
-void
moea_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
{
struct pvo_entry key, *pvo;
Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/powerpc/aim/mmu_oea64.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -283,7 +283,6 @@ static void moea64_syncicache(mmu_t, pm
/*
* Kernel MMU interface
*/
-void moea64_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t);
void moea64_clear_modify(mmu_t, vm_page_t);
void moea64_copy_page(mmu_t, vm_page_t, vm_page_t);
void moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset,
@@ -332,7 +331,6 @@ vm_offset_t moea64_dumpsys_map(mmu_t mmu
struct pmap_md * moea64_scan_md(mmu_t mmu, struct pmap_md *prev);
static mmu_method_t moea64_methods[] = {
- MMUMETHOD(mmu_change_wiring, moea64_change_wiring),
MMUMETHOD(mmu_clear_modify, moea64_clear_modify),
MMUMETHOD(mmu_copy_page, moea64_copy_page),
MMUMETHOD(mmu_copy_pages, moea64_copy_pages),
@@ -1026,59 +1024,6 @@ moea64_deactivate(mmu_t mmu, struct thre
}
void
-moea64_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired)
-{
- struct pvo_entry *pvo;
- uintptr_t pt;
- uint64_t vsid;
- int i, ptegidx;
-
- LOCK_TABLE_WR();
- PMAP_LOCK(pm);
- pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF);
-
- if (pvo != NULL) {
- pt = MOEA64_PVO_TO_PTE(mmu, pvo);
-
- if (wired) {
- if ((pvo->pvo_vaddr & PVO_WIRED) == 0)
- pm->pm_stats.wired_count++;
- pvo->pvo_vaddr |= PVO_WIRED;
- pvo->pvo_pte.lpte.pte_hi |= LPTE_WIRED;
- } else {
- if ((pvo->pvo_vaddr & PVO_WIRED) != 0)
- pm->pm_stats.wired_count--;
- pvo->pvo_vaddr &= ~PVO_WIRED;
- pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED;
- }
-
- if (pt != -1) {
- /* Update wiring flag in page table. */
- MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte,
- pvo->pvo_vpn);
- } else if (wired) {
- /*
- * If we are wiring the page, and it wasn't in the
- * page table before, add it.
- */
- vsid = PVO_VSID(pvo);
- ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo),
- pvo->pvo_vaddr & PVO_LARGE);
-
- i = MOEA64_PTE_INSERT(mmu, ptegidx, &pvo->pvo_pte.lpte);
-
- if (i >= 0) {
- PVO_PTEGIDX_CLR(pvo);
- PVO_PTEGIDX_SET(pvo, i);
- }
- }
-
- }
- UNLOCK_TABLE_WR();
- PMAP_UNLOCK(pm);
-}
-
-void
moea64_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
{
struct pvo_entry key, *pvo;
Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/powerpc/booke/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -266,7 +266,6 @@ void pmap_bootstrap_ap(volatile uint32_t
/*
* Kernel MMU interface
*/
-static void mmu_booke_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t);
static void mmu_booke_clear_modify(mmu_t, vm_page_t);
static void mmu_booke_copy(mmu_t, pmap_t, pmap_t, vm_offset_t,
vm_size_t, vm_offset_t);
@@ -331,7 +330,6 @@ static struct pmap_md *mmu_booke_scan_md
static mmu_method_t mmu_booke_methods[] = {
/* pmap dispatcher interface */
- MMUMETHOD(mmu_change_wiring, mmu_booke_change_wiring),
MMUMETHOD(mmu_clear_modify, mmu_booke_clear_modify),
MMUMETHOD(mmu_copy, mmu_booke_copy),
MMUMETHOD(mmu_copy_page, mmu_booke_copy_page),
@@ -2412,31 +2410,6 @@ mmu_booke_ts_referenced(mmu_t mmu, vm_pa
}
/*
- * Change wiring attribute for a map/virtual-address pair.
- */
-static void
-mmu_booke_change_wiring(mmu_t mmu, pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
- pte_t *pte;
-
- PMAP_LOCK(pmap);
- if ((pte = pte_find(mmu, pmap, va)) != NULL) {
- if (wired) {
- if (!PTE_ISWIRED(pte)) {
- pte->flags |= PTE_WIRED;
- pmap->pm_stats.wired_count++;
- }
- } else {
- if (PTE_ISWIRED(pte)) {
- pte->flags &= ~PTE_WIRED;
- pmap->pm_stats.wired_count--;
- }
- }
- }
- PMAP_UNLOCK(pmap);
-}
-
-/*
* Clear the wired attribute from the mappings for the specified range of
* addresses in the given pmap. Every valid mapping within that range must
* have the wired attribute set. In contrast, invalid mappings cannot have
Modified: head/sys/powerpc/powerpc/mmu_if.m
==============================================================================
--- head/sys/powerpc/powerpc/mmu_if.m Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/powerpc/powerpc/mmu_if.m Sun Aug 3 20:40:51 2014 (r269485)
@@ -152,22 +152,6 @@ METHOD void advise {
/**
- * @brief Change the wiring attribute for the page in the given physical
- * map and virtual address.
- *
- * @param _pmap physical map of page
- * @param _va page virtual address
- * @param _wired TRUE to increment wired count, FALSE to decrement
- */
-METHOD void change_wiring {
- mmu_t _mmu;
- pmap_t _pmap;
- vm_offset_t _va;
- boolean_t _wired;
-};
-
-
-/**
* @brief Clear the 'modified' bit on the given physical page
*
* @param _pg physical page
Modified: head/sys/powerpc/powerpc/pmap_dispatch.c
==============================================================================
--- head/sys/powerpc/powerpc/pmap_dispatch.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/powerpc/powerpc/pmap_dispatch.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -100,14 +100,6 @@ pmap_advise(pmap_t pmap, vm_offset_t sta
}
void
-pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
-{
-
- CTR4(KTR_PMAP, "%s(%p, %#x, %u)", __func__, pmap, va, wired);
- MMU_CHANGE_WIRING(mmu_obj, pmap, va, wired);
-}
-
-void
pmap_clear_modify(vm_page_t m)
{
Modified: head/sys/sparc64/sparc64/pmap.c
==============================================================================
--- head/sys/sparc64/sparc64/pmap.c Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/sparc64/sparc64/pmap.c Sun Aug 3 20:40:51 2014 (r269485)
@@ -1666,31 +1666,6 @@ pmap_object_init_pt(pmap_t pm, vm_offset
("pmap_object_init_pt: non-device object"));
}
-/*
- * Change the wiring attribute for a map/virtual-address pair.
- * The mapping must already exist in the pmap.
- */
-void
-pmap_change_wiring(pmap_t pm, vm_offset_t va, boolean_t wired)
-{
- struct tte *tp;
- u_long data;
-
- PMAP_LOCK(pm);
- if ((tp = tsb_tte_lookup(pm, va)) != NULL) {
- if (wired) {
- data = atomic_set_long(&tp->tte_data, TD_WIRED);
- if ((data & TD_WIRED) == 0)
- pm->pm_stats.wired_count++;
- } else {
- data = atomic_clear_long(&tp->tte_data, TD_WIRED);
- if ((data & TD_WIRED) != 0)
- pm->pm_stats.wired_count--;
- }
- }
- PMAP_UNLOCK(pm);
-}
-
static int
pmap_unwire_tte(pmap_t pm, pmap_t pm2, struct tte *tp, vm_offset_t va)
{
Modified: head/sys/vm/pmap.h
==============================================================================
--- head/sys/vm/pmap.h Sun Aug 3 18:39:11 2014 (r269484)
+++ head/sys/vm/pmap.h Sun Aug 3 20:40:51 2014 (r269485)
@@ -102,7 +102,6 @@ void pmap_advise(pmap_t pmap, vm_offse
int advice);
void pmap_align_superpage(vm_object_t, vm_ooffset_t, vm_offset_t *,
vm_size_t);
-void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t);
void pmap_clear_modify(vm_page_t m);
void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t);
void pmap_copy_page(vm_page_t, vm_page_t);
More information about the svn-src-head
mailing list