FreeBSD/sys/arm/arm/pmap-v6.c
/*
 *	Increase the starting virtual address of the given mapping if a
 *	different alignment might result in more section mappings.
 */
Increase the starting virtual address of the given mapping if a
different alignment might result in more section mappings.
Increase the starting virtual address of the given mapping if a different alignment might result in more section mappings .
void
pmap_align_superpage(vm_object_t object, vm_ooffset_t offset,
    vm_offset_t *addr, vm_size_t size)
{
	vm_offset_t pte1_offset;
	if (size < PTE1_SIZE)
		return;
	if (object != NULL && (object->flags & OBJ_COLORED) != 0)
		offset += ptoa(object->pg_color);
	pte1_offset = offset & PTE1_OFFSET;
	if (size - ((PTE1_SIZE - pte1_offset) & PTE1_OFFSET) < PTE1_SIZE ||
	    (*addr & PTE1_OFFSET) == pte1_offset)
		return;
	if ((*addr & PTE1_OFFSET) < pte1_offset)
		*addr = pte1_trunc(*addr) + pte1_offset;
	else
		*addr = pte1_roundup(*addr) + pte1_offset;
}
void pmap_align_superpage ( vm_object_t object , vm_ooffset_t offset , vm_offset_t * addr , vm_size_t size ) { vm_offset_t pte1_offset ; if ( size < PTE1_SIZE ) return ; if ( object != NULL && ( object -> flags & OBJ_COLORED ) != 0 ) offset += ptoa ( object -> pg_color ) ; pte1_offset = offset & PTE1_OFFSET ; if ( size - ( ( PTE1_SIZE - pte1_offset ) & PTE1_OFFSET ) < PTE1_SIZE || ( * addr & PTE1_OFFSET ) == pte1_offset ) return ; if ( ( * addr & PTE1_OFFSET ) < pte1_offset ) * addr = pte1_trunc ( * addr ) + pte1_offset ; else * addr = pte1_roundup ( * addr ) + pte1_offset ; }
Increase the starting virtual address of the given mapping if a
      different alignment might result in more section mappings.
Increase the starting virtual address of the given mapping if a different alignment might result in more section mappings .