summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-05-18 04:16:57 +0000
committeralc <alc@FreeBSD.org>2008-05-18 04:16:57 +0000
commita8f81206ad84b1ab64280e9138a55223f038fc54 (patch)
tree66daa86e54a43f6d578f868aa2c92f77693509f7 /sys/mips
parentafc301919a8dbd312078ed5029c7efe8e76a2302 (diff)
downloadFreeBSD-src-a8f81206ad84b1ab64280e9138a55223f038fc54.zip
FreeBSD-src-a8f81206ad84b1ab64280e9138a55223f038fc54.tar.gz
Retire pmap_addr_hint(). It is no longer used.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mips/pmap.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c
index a55167c..2fe2559 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);
OpenPOWER on IntegriCloud