Lines Matching refs:pages
444 vm_thread_stack_create(struct domainset *ds, int pages) in vm_thread_stack_create() argument
453 obj = vm_thread_kstack_size_to_obj(pages); in vm_thread_stack_create()
461 ks = vm_thread_alloc_kstack_kva(ptoa(pages + KSTACK_GUARD_PAGES), in vm_thread_stack_create()
470 if (vm_thread_stack_back(ks, ma, pages, req, domain) != 0) { in vm_thread_stack_create()
472 ptoa(pages + KSTACK_GUARD_PAGES), domain); in vm_thread_stack_create()
479 for (i = 0; i < pages; i++) in vm_thread_stack_create()
481 pmap_qenter(ks, ma, pages); in vm_thread_stack_create()
489 vm_thread_stack_dispose(vm_offset_t ks, int pages) in vm_thread_stack_dispose() argument
494 vm_object_t obj = vm_thread_kstack_size_to_obj(pages); in vm_thread_stack_dispose()
496 pindex = vm_kstack_pindex(ks, pages); in vm_thread_stack_dispose()
498 pmap_qremove(ks, pages); in vm_thread_stack_dispose()
500 for (i = 0; i < pages; i++) { in vm_thread_stack_dispose()
512 kasan_mark((void *)ks, ptoa(pages), ptoa(pages), 0); in vm_thread_stack_dispose()
514 ptoa(pages + KSTACK_GUARD_PAGES), domain); in vm_thread_stack_dispose()
521 vm_thread_new(struct thread *td, int pages) in vm_thread_new() argument
527 if (pages <= 1) in vm_thread_new()
528 pages = kstack_pages; in vm_thread_new()
529 else if (pages > KSTACK_MAX_PAGES) in vm_thread_new()
530 pages = KSTACK_MAX_PAGES; in vm_thread_new()
533 if (pages == kstack_pages && kstack_cache != NULL) in vm_thread_new()
543 pages); in vm_thread_new()
551 td->td_kstack_pages = pages; in vm_thread_new()
563 int pages; in vm_thread_dispose() local
565 pages = td->td_kstack_pages; in vm_thread_dispose()
570 if (pages == kstack_pages) { in vm_thread_dispose()
571 kasan_mark((void *)ks, 0, ptoa(pages), KASAN_KSTACK_FREED); in vm_thread_dispose()
574 vm_thread_stack_dispose(ks, pages); in vm_thread_dispose()
615 struct pctrie_iter pages; in vm_thread_stack_back() local
623 vm_page_iter_init(&pages, obj); in vm_thread_stack_back()
627 VM_ALLOC_NOCREAT | VM_ALLOC_WIRED, &pages); in vm_thread_stack_back()
631 domain, req_class | VM_ALLOC_WIRED, &pages); in vm_thread_stack_back()