va_range_fini(9)
π NAME π
Okay so bestie, you're on the va_range_fini(9) page in the Kernel API Manual, and honestly? It's a little cleanup baddie.
va_range_fini β clear a virtual addresses range. That's the whole assignment. She tidies up, she leaves. Periodt. π
β¨ SYNOPSIS β¨
void va_range_fini (struct hl_device *hdev , struct hl_va_range
*va_range );
Not her returning anything btw β she's a void girlie, she does the work and dips. π«Ά
π ARGUMENTS π
hdevβ pointer to the habanalabs structure. Your main-character handle to the whole device thing.va_rangeβ pointer to virtual addresses range. The range in question, the one getting the glow-down.
π DESCRIPTION π
This function does the following, and it's lowkey just the one thing:
- Frees the virtual addresses block list and its lock. That's it. Block list: gone. Lock: also gone. No loose ends, no leftovers, no "wait did we free that" at 3am. π₯
π« SEE ALSO π«
Kernel file: ./drivers/accel/habanalabs/common/memory.c β this is the mothership, the source of truth, iykyk. π¦
And the whole extended friend group, no one left out:
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_init(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, the entire group chat got @'d. πΈ
Ok that's the page!! She's short, she's efficient, she's iconic. Go free that block list, bestie. π§β¨
And a lil sign-off for the credits stans: this whole thing lives in ./drivers/accel/habanalabs/common, it's dated October 2026, and it shipped in the Kernel API Manual. 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