diff options
author | Alan Cox <alc@FreeBSD.org> | 2008-05-18 04:16:57 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2008-05-18 04:16:57 +0000 |
commit | 1ec1304bdb04575f37509b7a63b9124e428fe6ba (patch) | |
tree | 66daa86e54a43f6d578f868aa2c92f77693509f7 /sys/mips | |
parent | 5d6ab211960a5587c9ad795c59e662df02b35c9a (diff) | |
download | src-1ec1304bdb04575f37509b7a63b9124e428fe6ba.tar.gz src-1ec1304bdb04575f37509b7a63b9124e428fe6ba.zip |
Retire pmap_addr_hint(). It is no longer used.
Notes
Notes:
svn path=/head/; revision=179081
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/pmap.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index a55167cbd22e..2fe25592ec20 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -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); |