va_range_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 type enum 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. a u32 of 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: those start and end values 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