Index: sys/powerpc/powerpc/uma_machdep.c =================================================================== --- sys/powerpc/powerpc/uma_machdep.c +++ sys/powerpc/powerpc/uma_machdep.c @@ -95,14 +95,14 @@ { vm_page_t m; - if (!hw_direct_map) + if (hw_direct_map) + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); + else { + m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)mem)); pmap_remove(kernel_pmap,(vm_offset_t)mem, (vm_offset_t)mem + PAGE_SIZE); + } - if (hw_direct_map) - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); - else - m = PHYS_TO_VM_PAGE((vm_offset_t)mem); KASSERT(m != NULL, ("Freeing UMA block at %p with no associated page", mem)); #ifdef __powerpc64__