arch/sh/mm/hugetlbpage.c
Source file repositories/reference/linux-study-clean/arch/sh/mm/hugetlbpage.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/mm/hugetlbpage.c- Extension
.c- Size
- 1317 bytes
- Lines
- 73
- Domain
- Architecture Layer
- Bucket
- arch/sh
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/fs.hlinux/mm.hlinux/hugetlb.hlinux/pagemap.hlinux/sysctl.hasm/mman.hasm/tlb.hasm/tlbflush.hasm/cacheflush.h
Detected Declarations
function Copyright
Annotated Snippet
if (p4d) {
pud = pud_alloc(mm, p4d, addr);
if (pud) {
pmd = pmd_alloc(mm, pud, addr);
if (pmd)
pte = pte_alloc_huge(mm, pmd, addr);
}
}
}
return pte;
}
pte_t *huge_pte_offset(struct mm_struct *mm,
unsigned long addr, unsigned long sz)
{
pgd_t *pgd;
p4d_t *p4d;
pud_t *pud;
pmd_t *pmd;
pte_t *pte = NULL;
pgd = pgd_offset(mm, addr);
if (pgd) {
p4d = p4d_offset(pgd, addr);
if (p4d) {
pud = pud_offset(p4d, addr);
if (pud) {
pmd = pmd_offset(pud, addr);
if (pmd)
pte = pte_offset_huge(pmd, addr);
}
}
}
return pte;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/fs.h`, `linux/mm.h`, `linux/hugetlb.h`, `linux/pagemap.h`, `linux/sysctl.h`, `asm/mman.h`, `asm/tlb.h`.
- Detected declarations: `function Copyright`.
- Atlas domain: Architecture Layer / arch/sh.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.