hl_userptr_is_pinned(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hl_userptr_is_pinned β€” like, the vibe check for pinned userptrs

okay so bestie, welcome to the kernel API manual (section 9, kernel-space girlies only) and today's main character is hl_userptr_is_pinned πŸŽ€ β€” she literally just tells you whether the given userptr is pinned or not. that's it. that's the whole job. and honestly? iconic.


✨ SYNOPSIS ✨

bool hl_userptr_is_pinned (struct hl_device *hdev , u64 addr , u32 size
, struct list_head *userptr_list , struct hl_userptr **userptr );

like look at her go, five whole parameters, she's serving function signature realness πŸ’…


🌸 ARGUMENTS 🌸

  • hdev β€” pointer to the habanalabs device structure. the device in question, your fave.
  • addr β€” the user address to check. yes, that address.
  • size β€” the user block size to check. how big the block is, fr fr.
  • userptr_list β€” pointer to the list to clear. the list we're poking at 🫢
  • userptr β€” pointer to userptr to check. the one we're actually asking about.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's what she does, step by step, no cap:

  • iterates over the list and checks if the given userptr is in it β€” which means it's pinned. if so, returns true. otherwise, returns false. periodt. πŸ’€
ngl it's giving simple, but that's the whole point β€” one job, done well, main character energy only πŸ‘‘

🌈 SEE ALSO 🌈

kernel file ./drivers/accel/habanalabs/common/memory.c β€” go read her, she's long but worth it πŸ’–

and the whole friend group, in order:


anyway that's the page, tysm for reading, she lives in ./drivers/accel/habanalabs/common and this edition dropped in October 2026 β€” catch you in the next hl_userptr_is_pinned(9) bestie, mwah πŸ§šπŸ’œ

πŸ“¦ where this page comes from