unmap_device_va(9)
π unmap_device_va (kernel API manual, bestie)
okay so this is unmap_device_va(9) from the Kernel API Manual β yes the whole function-name-plus-(9) thing is the vibe, that's just how kernel pages introduce themselves π
β¨ NAME β¨
unmap_device_va β unmaps the given device virtual address. that's it, that's the whole job, and she does it flawlessly π«Ά
πΈ SYNOPSIS πΈ
int unmap_device_va (struct hl_ctx *ctx , struct hl_mem_in *args , bool
ctx_free );
like, three args, returns an int, no big deal π
π¦ ARGUMENTS π¦
ctxβ pointer to the context structure. the whole situation lives in here β¨argsβ host parameters with the device virtual address to unmap. the "which one, bestie" of it all π―ctx_freeβtrueif we're in the context free flow,falseotherwise. lowkey important to get right π
π DESCRIPTION π
so here's literally what this function does, in order, no cap:
- unmap the physical pages related to the given virtual address π₯
- return the device virtual block to the virtual block list π§
that's the whole glow-up. she unmaps, she returns the block, she leaves πΈ
π SEE ALSO π
kernel file: ./drivers/accel/habanalabs/common/memory.c β that's where she lives, main character energy fr fr π
and the whole friend group, aka every single one of these:
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)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)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)
go read them, iykyk πβ¨
okay that's the page!! sign-off time π this one's from ./drivers/accel/habanalabs/common, dated October 2026, and it's unmap_device_va(9) out here living her best life. mwah, slay, bye bestie π
ππ
π¦ 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