softleaf_to_pte(9)
π softleaf_to_pte β the Kernel API Manual, section 9 glow-up β¨
okay so bestie, welcome to softleaf_to_pte(9) from the Kernel API Manual (section 9, kernel-nerd territory, we love her π). this is the page where your leaf entry gets to go backstage and come out wearing its architecture-specific PTE fit. iconique.
πΈ NAME πΈ
softleaf_to_pte β literally just: get a PTE entry out of a leaf entry. that's the whole vibe. π
β¨ SYNOPSIS β¨
pte_t softleaf_to_pte (softleaf_t entry );
not me writing the signature exactly like this, character for character, because the compiler does NOT accept vibes π
π«Ά ARGUMENTS π«Ά
entryβ the leaf entry. that's it. that's the whole argument. she's the main character here π
π« DESCRIPTION π«
so what actually happens? this function generates an architecture-specific PTE entry β yes, arch-specific, meaning your CPU's little flavor of PTE, no cap π₯ β and that PTE can be utilised to encode the metadata that the leaf entry encodes.
like, the leaf entry already knows stuff. the PTE is the outfit that carries that same metadata into PTE-land. it's giving translation layer, it's giving "same info, different format," and honestly? we stan a consistent representation π
ngl there's no drama here. no side effects listed, no gotchas in the source. just a clean little conversion, slay.
π¦ RETURN π¦
returns the architecture-specific PTE entry that encodes the leaf entry. that's the whole return value. a PTE. wearing the leaf's metadata. periodt π
π SEE ALSO π
the softleaf_* friend group, the pte_* crew, and a couple of pmd_* cousins β all hanging out in the kernel file ./include/linux/leafops.h. go say hi to every single one, i'm not kidding, all of them, current count: thirty-four (34) besties π
softleaf_mk_none(9)softleaf_from_pte(9)softleaf_from_pmd(9)softleaf_to_pmd(9)softleaf_is_none(9)softleaf_type(9)softleaf_is_swap(9)softleaf_is_migration_write(9)softleaf_is_migration_read(9)softleaf_is_migration_read_exclusive(9)softleaf_is_migration(9)softleaf_is_device_private_write(9)softleaf_is_device_private(9)softleaf_is_device_exclusive(9)softleaf_is_hwpoison(9)softleaf_is_marker(9)softleaf_to_marker(9)softleaf_has_pfn(9)softleaf_to_pfn(9)softleaf_to_page(9)softleaf_to_folio(9)softleaf_is_poison_marker(9)softleaf_is_guard_marker(9)softleaf_is_uffd_wp_marker(9)softleaf_is_migration_young(9)softleaf_is_migration_dirty(9)pte_is_marker(9)pte_is_uffd_wp_marker(9)pte_is_uffd_marker(9)pmd_is_device_private_entry(9)pmd_is_migration_entry(9)softleaf_is_valid_pmd_entry(9)pmd_is_valid_softleaf(9)pmd_to_softleaf_folio(9)
π lowkey reminder: the header above sayssoftleaf_to_pte(9), the manual is the Kernel API Manual, and the whole thing lives in./include/linux. the source file it points at is./include/linux/leafops.h. iykyk π§
and that's the page!! π thanks for reading my little manpage era β this one shipped from ./include/linux, October 2026, and yeah that's the footer, we're mentioning it here because we're cute like that πβ¨π«Ά
π¦ 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