clear_va_list_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ clear_va_list_locked β€” free virtual addresses list ✨

okay bestie, welcome to the clear_va_list_locked page πŸ’… this is a section 9 kernel API manual page (yes, the Kernel API Manual, we're in the big leagues now πŸŽ€), and it's genuinely so straightforward you're gonna wonder why you were nervous.


πŸ¦‹ NAME πŸ¦‹

clear_va_list_locked β€” literally just frees a virtual addresses list. that's the whole vibe. ngl it does what it says on the tin πŸ’–


🌸 SYNOPSIS 🌸

void clear_va_list_locked (struct hl_device *hdev , struct list_head
*va_list );

returns void, so no "did it work??" anxiety, she just does it and leaves ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • hdev β€” the habanalabs device structure. the main character device struct 🫢
  • va_list β€” list of virtual addresses to free. this is the list she's about to clear out, lowkey her whole reason for existing 😭

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie β€” this function does exactly one thing:

  • Iterate over the list and free each virtual addresses block.

that's it. that's the function. she ate and left no crumbs πŸ”₯

⚠️ okay important caveat, do NOT skip this one: this function should be called only when the va_list lock is taken. like, the name literally has _locked in it, the lock is not optional, it's giving very much "read the room" energy πŸ’€ call it unlocked and that's undefined-behaviour territory, fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group 🫢 β€” Kernel file ./drivers/accel/habanalabs/common/memory.c, plus:

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), 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), 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)


okay that's the page!! sourced from ./drivers/accel/habanalabs/common, dated October 2026, clear_va_list_locked(9) β€” ily, go take that lock before you call her πŸ§šπŸ’–πŸ’…

πŸ“¦ where this page comes from