hl_userptr_delete_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hl_userptr_delete_list β€” clear userptr list

okay bestie, this one's from the Kernel API Manual (habanalabs land, we love her) and honestly? she's a little cleanup queen. short, sweet, does exactly one thing. let's get into it πŸŽ€


✨ SYNOPSIS ✨

void hl_userptr_delete_list (struct hl_device *hdev , struct list_head
*userptr_list );

that's it. that's the whole signature. no return value, no drama, just vibes and void 🫢


🌸 ARGUMENTS 🌸

  • hdev β€” pointer to the habanalabs device structure. like, the device. the main character here πŸ’–
  • userptr_list β€” pointer to the list to clear. yes the list. the one getting the glow-up ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function does the following:

  • Iterates over the list and unpins the host memory and frees the userptr structure.

lowkey that's it. it walks the list, unpins the host memory 🌈, and frees the userptr structure. cleanup arc, iconic, no notes πŸ’…

ngl bestie, this is the "put your shit away" function. unpin, free, done. that's the whole personality πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/accel/habanalabs/common/memory.c

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

like genuinely that's a whole friend group of functions, go say hi πŸ˜­πŸ’œ


sign-off bestie πŸ“ β€” this page lives under ./drivers/accel/habanalabs/common and she was stamped October 2026. one page, one job, one slay. bye pookie πŸ‘‹βœ¨

πŸ“¦ where this page comes from