Retire pmap_addr_hint(). It is no longer used.
This commit is contained in:
parent
5d6ab21196
commit
1ec1304bdb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179081
@ -4458,18 +4458,6 @@ if (oldpmap) /* XXX FIXME */
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
|
||||
if ((obj == NULL) || (size < NBPDR) || (obj->type != OBJT_DEVICE)) {
|
||||
return addr;
|
||||
}
|
||||
|
||||
addr = (addr + (NBPDR - 1)) & ~(NBPDR - 1);
|
||||
return addr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -4348,13 +4348,6 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr)
|
||||
}
|
||||
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
|
||||
return(addr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -4586,18 +4586,6 @@ pmap_activate(struct thread *td)
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
|
||||
if ((obj == NULL) || (size < NBPDR) || (obj->type != OBJT_DEVICE)) {
|
||||
return addr;
|
||||
}
|
||||
|
||||
addr = (addr + PDRMASK) & ~PDRMASK;
|
||||
return addr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -2259,13 +2259,6 @@ pmap_switch(pmap_t pm)
|
||||
return (prevpm);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -2838,19 +2838,6 @@ pmap_activate(struct thread *td)
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
/* TBD */
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
|
||||
if ((obj == NULL) || (size < NBSEG) || (obj->type != OBJT_DEVICE)) {
|
||||
return addr;
|
||||
}
|
||||
addr = (addr + (NBSEG - 1)) & ~(NBSEG - 1);
|
||||
return addr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
@ -2859,6 +2846,20 @@ void
|
||||
pmap_align_superpage(vm_object_t object, vm_ooffset_t offset,
|
||||
vm_offset_t *addr, vm_size_t size)
|
||||
{
|
||||
vm_offset_t superpage_offset;
|
||||
|
||||
if (size < NBSEG)
|
||||
return;
|
||||
if (object != NULL && (object->flags & OBJ_COLORED) != 0)
|
||||
offset += ptoa(object->pg_color);
|
||||
superpage_offset = offset & SEGOFSET;
|
||||
if (size - ((NBSEG - superpage_offset) & SEGOFSET) < NBSEG ||
|
||||
(*addr & SEGOFSET) == superpage_offset)
|
||||
return;
|
||||
if ((*addr & SEGOFSET) < superpage_offset)
|
||||
*addr = (*addr & ~SEGOFSET) + superpage_offset;
|
||||
else
|
||||
*addr = ((*addr + SEGOFSET) & ~SEGOFSET) + superpage_offset;
|
||||
}
|
||||
|
||||
int pmap_pid_dump(int pid);
|
||||
|
@ -269,7 +269,6 @@ static struct ptbl_buf *ptbl_bufs;
|
||||
/*
|
||||
* Kernel MMU interface
|
||||
*/
|
||||
static vm_offset_t mmu_booke_addr_hint(mmu_t, vm_object_t, vm_offset_t, vm_size_t);
|
||||
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_clear_reference(mmu_t, vm_page_t);
|
||||
@ -323,7 +322,6 @@ static boolean_t mmu_booke_page_executable(mmu_t, vm_page_t);
|
||||
|
||||
static mmu_method_t mmu_booke_methods[] = {
|
||||
/* pmap dispatcher interface */
|
||||
MMUMETHOD(mmu_addr_hint, mmu_booke_addr_hint),
|
||||
MMUMETHOD(mmu_change_wiring, mmu_booke_change_wiring),
|
||||
MMUMETHOD(mmu_clear_modify, mmu_booke_clear_modify),
|
||||
MMUMETHOD(mmu_clear_reference, mmu_booke_clear_reference),
|
||||
@ -2320,14 +2318,6 @@ mmu_booke_mincore(mmu_t mmu, pmap_t pmap, vm_offset_t addr)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static vm_offset_t
|
||||
mmu_booke_addr_hint(mmu_t mmu, vm_object_t object, vm_offset_t va,
|
||||
vm_size_t size)
|
||||
{
|
||||
|
||||
return (va);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
/* TID handling */
|
||||
/**************************************************************************/
|
||||
|
@ -100,10 +100,10 @@ CODE {
|
||||
return;
|
||||
}
|
||||
|
||||
static vm_offset_t mmu_null_addr_hint(mmu_t mmu, vm_object_t object,
|
||||
vm_offset_t va, vm_size_t size)
|
||||
static void mmu_null_align_superpage(mmu_t mmu, vm_object_t object,
|
||||
vm_ooffset_t offset, vm_offset_t *addr, vm_size_t size)
|
||||
{
|
||||
return (va);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
@ -659,15 +659,17 @@ METHOD void deactivate {
|
||||
* return the given tentative start address.
|
||||
*
|
||||
* @param _obj VM backing object
|
||||
* @param _offset starting offset with the VM object
|
||||
* @param _addr initial guess at virtual address
|
||||
* @param _size size of virtual address range
|
||||
*/
|
||||
METHOD vm_offset_t addr_hint {
|
||||
METHOD void align_superpage {
|
||||
mmu_t _mmu;
|
||||
vm_object_t _obj;
|
||||
vm_offset_t _addr;
|
||||
vm_ooffset_t _offset;
|
||||
vm_offset_t *_addr;
|
||||
vm_size_t _size;
|
||||
} DEFAULT mmu_null_addr_hint;
|
||||
} DEFAULT mmu_null_align_superpage;
|
||||
|
||||
|
||||
|
||||
|
@ -297,12 +297,6 @@ pmap_deactivate(struct thread *td)
|
||||
MMU_DEACTIVATE(mmu_obj, td);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
|
||||
{
|
||||
return (MMU_ADDR_HINT(mmu_obj, obj, addr, size));
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
@ -311,6 +305,8 @@ void
|
||||
pmap_align_superpage(vm_object_t object, vm_ooffset_t offset,
|
||||
vm_offset_t *addr, vm_size_t size)
|
||||
{
|
||||
|
||||
MMU_ALIGN_SUPERPAGE(mmu_obj, object, offset, addr, size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1978,13 +1978,6 @@ pmap_activate(struct thread *td)
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t object, vm_offset_t va, vm_size_t size)
|
||||
{
|
||||
|
||||
return (va);
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -424,12 +424,6 @@ pmap_activate(struct thread *td)
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
pmap_addr_hint(vm_object_t object, vm_offset_t va, vm_size_t size)
|
||||
{
|
||||
return (va);
|
||||
}
|
||||
|
||||
/*
|
||||
* Increase the starting virtual address of the given mapping if a
|
||||
* different alignment might result in more superpage mappings.
|
||||
|
@ -132,7 +132,6 @@ void pmap_zero_page_area(vm_page_t, int off, int size);
|
||||
void pmap_zero_page_idle(vm_page_t);
|
||||
int pmap_mincore(pmap_t pmap, vm_offset_t addr);
|
||||
void pmap_activate(struct thread *td);
|
||||
vm_offset_t pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size);
|
||||
|
||||
#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count)
|
||||
#define pmap_wired_count(pm) ((pm)->pm_stats.wired_count)
|
||||
|
Loading…
Reference in New Issue
Block a user