init_phys_pg...from_userptr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… init_phys_pg_pack_from_userptr β€” Kernel API Manual, bestie edition ✨

okay so the page is literally called init_phys_pg...from_userptr(9) (yes that's the shortened header, the full name lives down in NAME, don't come for me 😭) and it's giving "kernel internals but make it cute". Buckle up πŸŽ€

✨ NAME ✨

init_phys_pg_pack_from_userptr β€” initialize a physical page pack from host memory 🫢

🌸 SYNOPSIS 🌸

int init_phys_pg_pack_from_userptr (struct hl_ctx *ctx , struct hl_userptr *userptr , struct hl_vm_phys_pg_pack **pphys_pg_pack , bool force_regular_page );

πŸ’– ARGUMENTS πŸ’–

  • ctx β€” pointer to the context structure, bestie. that's the whole vibe.
  • userptr β€” the userptr you're initializing from 🌸
  • pphys_pg_pack β€” the result pointer. this is where the good stuff lands, no cap.
  • force_regular_page β€” tells the function to ignore the huge page optimization, even if it's possible 😀. needed for cases where the device VA is allocated before we know the composition of the physical pages β€” iykyk, timing is everything.

πŸ¦‹ DESCRIPTION πŸ¦‹

this function does the following, and honestly? iconic behavior:

  • create a physical page pack from the physical pages related to the given virtual block. literally that's the job. slay. πŸ‘‘

🌈 SEE ALSO 🌈

the kernel file it lives in is ./drivers/accel/habanalabs/common/memory.c β€” go read the source, it's like the group chat archive fr fr.

and the friend group πŸ’œ, all in (9):


ok that's the whole page, nothing skipped, every single option and reference accounted for πŸ’… go be a main character in the kernel 🧚

and like, mandatory sign-off credits moment πŸŽ€: this masterpiece comes from ./drivers/accel/habanalabs/common, dated October 2026, and the page answers to init_phys_pg...from_userptr(9) ⭐ bye bestie, drink water πŸ’œ

πŸ“¦ where this page comes from