va_range_init(9)
π va_range_init(9) π
okay so bestie, welcome to the va_range_init(9) page from the Kernel API Manual β yes that manual, the kernel one, we're doing it, and honestly? iconic of you to be here. π This is the function that gets a virtual address range all set up and ready to serve. Let's go. β¨
β¨ NAME β¨
va_range_init β initialize virtual addresses range. that's the whole vibe, that's the job. π
π¦ SYNOPSIS π¦
int va_range_init (struct hl_device *hdev , struct hl_va_range
**va_ranges , enum hl_va_range_type range_type , u64 start , u64 end ,
u32 page_size );
look at that signature. she's long, she's thorough, she's got five parameters plus a return type. no cap, just read it carefully. πΈ
π ARGUMENTS π
every single one is important, no skipping, we don't do skipping here π«Ά
hdevβ pointer to the habanalabs device structure. your actual device, the main character of this whole operation.va_rangesβ pointer to va_ranges array. yeah, the array of va_ranges. plural. keep up bestie πrange_typeβ virtual address range type. of typeenum hl_va_range_type, because apparently we're being specific today.startβ range start address, inclusive. literally included in the range, that's what inclusive means, i'm so proud of you for remembering.endβ range end address, inclusive. also included!! both ends are in!! πpage_sizeβ page size for this va_range. au32of it, specifically. π
π DESCRIPTION π
okay so here's literally what this function does β the whole list, all one item of it, don't come for me:
- Initializes the virtual addresses list of the given range with the given addresses. π
that's it. that's the function. she takes your range and fills in the virtual addresses list with the addresses you handed over. clean, simple, effective. ate and left no crumbs. π₯
β οΈ heads up bestie: thosestartandendvalues above are inclusive, both of them β so don't go doing any sneaky off-by-one stuff and then blaming the manpage, okay? π
π§ SEE ALSO π§
kernel file ./drivers/accel/habanalabs/common/memory.c β that's where she lives, that's her home address, go visit her sometime. π
and now the friend group, the whole group chat, every single one of them (iykyk):
dma_map_host_va(9), dma_unmap_host_va(9), dram_pg_pool_do_release(9), free_phys_pg_pack(9), free_device_memory(9), clear_va_list_locked(9), print_va_list_locked(9), merge_va_blocks_locked(9), add_va_block_locked(9), add_va_block(9), is_hint_crossing_range(9), get_va_block(9), hl_get_va_range_type(9), hl_unreserve_va_block(9), init_phys_pg_pack_from_userptr(9), map_phys_pg_pack(9), unmap_phys_pg_pack(9), map_device_va(9), unmap_device_va(9), hl_hw_block_mmap(9), export_dmabuf_from_addr(9), allocate_timestamps_buffers(9), hl_pin_host_memory(9), hl_userptr_delete_list(9), hl_userptr_is_pinned(9), va_range_fini(9), vm_ctx_init_with_ranges(9), hl_vm_ctx_fini(9), hl_vm_init(9), hl_vm_fini(9), hl_hw_block_mem_init(9), hl_hw_block_mem_fini(9)
like i said. the whole group chat. all thirty-one of them. go say hi. π
and that's the page!! π¦ you got here from ./drivers/accel/habanalabs/common, dated October 2026 β yes, 2026, we're manifesting it, the future is now bestie β¨π stay hydrated, read your manpages, and slay your virtual address ranges. mwah!! π
ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms