arch/arm64/include/asm/ptdump.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/ptdump.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/ptdump.h- Extension
.h- Size
- 2842 bytes
- Lines
- 90
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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/ptdump.hlinux/mm_types.hlinux/seq_file.h
Detected Declarations
struct addr_markerstruct ptdump_infostruct ptdump_prot_bitsstruct ptdump_pg_levelstruct ptdump_pg_statefunction ptdump_debugfs_register
Annotated Snippet
struct addr_marker {
unsigned long start_address;
char *name;
};
struct ptdump_info {
struct mm_struct *mm;
const struct addr_marker *markers;
unsigned long base_addr;
};
struct ptdump_prot_bits {
ptval_t mask;
ptval_t val;
const char *set;
const char *clear;
};
struct ptdump_pg_level {
const struct ptdump_prot_bits *bits;
char name[4];
int num;
ptval_t mask;
};
/*
* The page dumper groups page table entries of the same type into a single
* description. It uses pg_state to track the range information while
* iterating over the pte entries. When the continuity is broken it then
* dumps out a description of the range.
*/
struct ptdump_pg_state {
struct ptdump_state ptdump;
struct ptdump_pg_level *pg_level;
struct seq_file *seq;
const struct addr_marker *marker;
const struct mm_struct *mm;
unsigned long start_address;
int level;
ptval_t current_prot;
bool check_wx;
unsigned long wx_pages;
unsigned long uxn_pages;
};
void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
void note_page(struct ptdump_state *pt_st, unsigned long addr, int level,
pteval_t val);
void note_page_pte(struct ptdump_state *st, unsigned long addr, pte_t pte);
void note_page_pmd(struct ptdump_state *st, unsigned long addr, pmd_t pmd);
void note_page_pud(struct ptdump_state *st, unsigned long addr, pud_t pud);
void note_page_p4d(struct ptdump_state *st, unsigned long addr, p4d_t p4d);
void note_page_pgd(struct ptdump_state *st, unsigned long addr, pgd_t pgd);
void note_page_flush(struct ptdump_state *st);
#ifdef CONFIG_PTDUMP_DEBUGFS
#define EFI_RUNTIME_MAP_END DEFAULT_MAP_WINDOW_64
void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
#else
static inline void ptdump_debugfs_register(struct ptdump_info *info,
const char *name) { }
#endif /* CONFIG_PTDUMP_DEBUGFS */
#else
static inline void note_page(struct ptdump_state *pt_st, unsigned long addr,
int level, pteval_t val) { }
static inline void note_page_pte(struct ptdump_state *st, unsigned long addr, pte_t pte) { }
static inline void note_page_pmd(struct ptdump_state *st, unsigned long addr, pmd_t pmd) { }
static inline void note_page_pud(struct ptdump_state *st, unsigned long addr, pud_t pud) { }
static inline void note_page_p4d(struct ptdump_state *st, unsigned long addr, p4d_t p4d) { }
static inline void note_page_pgd(struct ptdump_state *st, unsigned long addr, pgd_t pgd) { }
static inline void note_page_flush(struct ptdump_state *st) { }
#endif /* CONFIG_PTDUMP */
#endif /* __ASM_PTDUMP_H */
Annotation
- Immediate include surface: `linux/ptdump.h`, `linux/mm_types.h`, `linux/seq_file.h`.
- Detected declarations: `struct addr_marker`, `struct ptdump_info`, `struct ptdump_prot_bits`, `struct ptdump_pg_level`, `struct ptdump_pg_state`, `function ptdump_debugfs_register`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.