pmd_set_huge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ pmd_set_huge(9) ✨

okay so we're in the Kernel API Manual bestie, and today's main character is pmd_set_huge πŸ’… β€” the little function that goes "here, have a huge PMD mapping" πŸŽ€


🌸 NAME 🌸

pmd_set_huge β€” set up kernel PMD mapping. literally what it says on the tin, no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int pmd_set_huge (pmd_t *pmd , phys_addr_t addr , pgprot_t prot );

three args, one int coming back at you. slay ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • pmd β€” pointer to the PMD entry 🧚 this is the thing we're messing with
  • addr β€” the virtual address associated with the PMD entry πŸ“
  • prot β€” the protection bits to use πŸ” yes, these matter, don't sleep on them

πŸ’– DESCRIPTION πŸ’–

so the actual explanation? it's not even here β€” it says:

See text over pud_set_huge above.

like, go look at your sister function's docs, she has the whole story πŸ‘‘ iykyk

returns 1 on success and 0 on failure. that's it, that's the whole vibe β€” no negative errno era, just a humble little 1 or 0 ⭐


🌈 SEE ALSO 🌈

the whole huge-page friend group fr fr πŸ’œ


and that's the page!! brought to you by the files in ./arch/x86/mm, dated October 2026 β€” mwah, go touch some page tables bestie πŸ’…πŸ’–

πŸ“¦ where this page comes from