Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/aim/mmu_radix.c
Show First 20 Lines • Show All 3,570 Lines • ▼ Show 20 Lines | |||||
static MALLOC_DEFINE(M_RADIX_PGD, "radix_pgd", "radix page table root directory"); | static MALLOC_DEFINE(M_RADIX_PGD, "radix_pgd", "radix page table root directory"); | ||||
static uma_zone_t zone_radix_pgd; | static uma_zone_t zone_radix_pgd; | ||||
static int | static int | ||||
radix_pgd_import(void *arg __unused, void **store, int count, int domain __unused, | radix_pgd_import(void *arg __unused, void **store, int count, int domain __unused, | ||||
int flags) | int flags) | ||||
{ | { | ||||
int req; | |||||
/* XXXMJ presumably WAITOK shouldn't be hard-coded */ | |||||
req = VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_WAITOK; | |||||
alc: Does VM_ALLOC_ZERO actually make sense here? | |||||
markjAuthorUnsubmitted Done Inline ActionsIt doesn't seem so. I think both of these XXX comments can be resolved by ORing malloc2vm_flags(flags) into req. markj: It doesn't seem so. I think both of these XXX comments can be resolved by ORing… | |||||
for (int i = 0; i < count; i++) { | for (int i = 0; i < count; i++) { | ||||
vm_page_t m = vm_page_alloc_contig(NULL, 0, | vm_page_t m = vm_page_alloc_noobj_contig(req, | ||||
VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | | RADIX_PGD_SIZE / PAGE_SIZE, | ||||
VM_ALLOC_ZERO | VM_ALLOC_WAITOK, RADIX_PGD_SIZE/PAGE_SIZE, | |||||
0, (vm_paddr_t)-1, RADIX_PGD_SIZE, L1_PAGE_SIZE, | 0, (vm_paddr_t)-1, RADIX_PGD_SIZE, L1_PAGE_SIZE, | ||||
VM_MEMATTR_DEFAULT); | VM_MEMATTR_DEFAULT); | ||||
/* XXX zero on alloc here so we don't have to later */ | /* XXX zero on alloc here so we don't have to later */ | ||||
store[i] = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); | store[i] = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); | ||||
} | } | ||||
return (count); | return (count); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,877 Lines • Show Last 20 Lines |
Does VM_ALLOC_ZERO actually make sense here?