Date: Sun, 17 Nov 2013 23:28:10 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258287 - head/sys/arm/arm Message-ID: <201311172328.rAHNSA6s014597@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sun Nov 17 23:28:10 2013 New Revision: 258287 URL: http://svnweb.freebsd.org/changeset/base/258287 Log: Implement pmap_align_superpage(). MFC after: 6 weeks Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Nov 17 23:19:06 2013 (r258286) +++ head/sys/arm/arm/pmap-v6.c Sun Nov 17 23:28:10 2013 (r258287) @@ -5021,6 +5021,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 < NBPDR) + return; + if (object != NULL && (object->flags & OBJ_COLORED) != 0) + offset += ptoa(object->pg_color); + superpage_offset = offset & PDRMASK; + if (size - ((NBPDR - superpage_offset) & PDRMASK) < NBPDR || + (*addr & PDRMASK) == superpage_offset) + return; + if ((*addr & PDRMASK) < superpage_offset) + *addr = (*addr & ~PDRMASK) + superpage_offset; + else + *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311172328.rAHNSA6s014597>