hl_pin_host_memory(9)
π NAME π
hl_pin_host_memory β pins a chunk of host memory. This is the hl_pin_host_memory(9) page from the Kernel API Manual, and yes bestie, the whole vibe is literally pinning host memory. No cap. π
β¨ SYNOPSIS β¨
int hl_pin_host_memory (struct hl_device *hdev , u64 addr , u64 size ,
struct hl_userptr *userptr );
π«Ά ARGUMENTS π«Ά
hdevβ pointer to the habanalabs device structure. Thatβs the habanalabs device, okay? Iconic.addrβ the host virtual address of the memory area. The address. The spot. The place. πsizeβ the size of the memory area. Yes, the amount of memory weβre talking about, bestie.userptrβ pointer tohl_userptrstructure. Fr fr, thatβs the one.
π₯ DESCRIPTION π₯
Okay so hereβs the tea: this function does the following, and the list is short but itβs giving exactly what it needs to give:
- Pins the physical pages. Thatβs the whole first thing. Periodt.
- Create an SG list from those pages. Yep, an SG list gets created from those pages. Slay.
π SEE ALSO π
This is the part where the page is like βgo look at these other icons,β and honestly the list is long but every single one deserves its moment:
- 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_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 bestie, thatβs the whole manual page. Source/version: ./drivers/accel/habanalabs/common; date: October 2026; and yes, itβs the hl_pin_host_memory(9) page. You ate that, no notes. π
β¨π¦
π¦ 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