Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_ktls.c
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | #endif | ||||
return (cpuid); | return (cpuid); | ||||
} | } | ||||
#endif | #endif | ||||
static int | static int | ||||
ktls_buffer_import(void *arg, void **store, int count, int domain, int flags) | ktls_buffer_import(void *arg, void **store, int count, int domain, int flags) | ||||
{ | { | ||||
vm_page_t m; | vm_page_t m; | ||||
int i; | int i, req; | ||||
KASSERT((ktls_maxlen & PAGE_MASK) == 0, | KASSERT((ktls_maxlen & PAGE_MASK) == 0, | ||||
("%s: ktls max length %d is not page size-aligned", | ("%s: ktls max length %d is not page size-aligned", | ||||
__func__, ktls_maxlen)); | __func__, ktls_maxlen)); | ||||
req = VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_NODUMP | | |||||
malloc2vm_flags(flags); | |||||
for (i = 0; i < count; i++) { | for (i = 0; i < count; i++) { | ||||
m = vm_page_alloc_contig_domain(NULL, 0, domain, | m = vm_page_alloc_noobj_contig_domain(domain, req, | ||||
VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | | |||||
VM_ALLOC_NODUMP | malloc2vm_flags(flags), | |||||
atop(ktls_maxlen), 0, ~0ul, PAGE_SIZE, 0, | atop(ktls_maxlen), 0, ~0ul, PAGE_SIZE, 0, | ||||
VM_MEMATTR_DEFAULT); | VM_MEMATTR_DEFAULT); | ||||
if (m == NULL) | if (m == NULL) | ||||
break; | break; | ||||
store[i] = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); | store[i] = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); | ||||
} | } | ||||
return (i); | return (i); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,199 Lines • Show Last 20 Lines |