hl_mmu_hr_init(9)
π hl_mmu_hr_init β kernel API manual, bestie edition π
okay so we're in the <pink>Kernel API Manual</pink> today and the star of the show is hl_mmu_hr_init(9) β yes she's a 9, yes she's iconic, no we're not intimidated β¨
πΈ NAME πΈ
hl_mmu_hr_init β literally just initializes the MMU module. that's it, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
int hl_mmu_hr_init (struct hl_device *hdev , struct hl_mmu_hr_priv
*hr_priv , u32 hop_table_size , u64 pgt_size );
like look at that signature. four args. gorgeous. no notes π
π ARGUMENTS π
hdevβ the habanalabs device structure. the whole device vibe, the main character fr fr.hr_privβ MMU HR private data. it's giving private, it's giving data, we respect her privacy π.hop_table_sizeβ HOP table size. yes, HOP. lowercase energy, uppercase importance π.pgt_sizeβ the memory size allocated for the page table. how much room the page table gets to ~thrive~ πβ¨
π DESCRIPTION π
so what does she return? return 0 on success otherwise non-zero error code β classic, iconic, no cap π. zero means we ate, nonzero means ngl something went sideways.
this function does the following (and she does it all, because she's that girl):
- Create a pool of pages for
pgt_infos. a whole lil pool πββοΈπ - Create a shadow table for
pgt. shadow table!! mysterious, dramatic, lowkey obsessed πΆοΈβ¨
π«Ά SEE ALSO π«Ά
the kernel file lives right here, go say hi:
./drivers/accel/habanalabs/common/mmu/mmu.c
and the whole friend group, all of them, every single one, no skipping (i would never):
hl_mmu_get_funcs(9)hl_mmu_init(9)hl_mmu_fini(9)hl_mmu_ctx_init(9)hl_mmu_scramble_addr(9)hl_mmu_descramble_addr(9)hl_mmu_get_hop_pte_phys_addr(9)hl_mmu_hr_pool_destroy(9)hl_mmu_hr_fini(9)hl_mmu_hr_free_hop_remove_pgt(9)hl_mmu_hr_pte_phys_to_virt(9)hl_mmu_hr_write_pte(9)hl_mmu_hr_clear_pte(9)hl_mmu_hr_put_pte(9)hl_mmu_hr_get_pte(9)hl_mmu_hr_get_next_hop_pgt_info(9)hl_mmu_hr_alloc_hop(9)hl_mmu_hr_get_alloc_next_hop(9)hl_mmu_hr_get_tlb_info(9)
bestie real talk: she returns 0 on success and a non-zero error code otherwise β check it, don't ignore it, that's the vibe check π¨π
sign-off time π this page came from ./drivers/accel/habanalabs/com... and it's dated October 2026 β yes, the future, because she's ahead of her time βπ slay, periodt, bye bestie π¦π
π¦ 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