arch/x86/mm/pat/memtype.h
Source file repositories/reference/linux-study-clean/arch/x86/mm/pat/memtype.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/mm/pat/memtype.h- Extension
.h- Size
- 1470 bytes
- Lines
- 50
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct memtypefunction memtype_check_insertfunction memtype_copy_nth_element
Annotated Snippet
struct memtype {
u64 start;
u64 end;
u64 subtree_max_end;
enum page_cache_mode type;
struct rb_node rb;
};
static inline char *cattr_name(enum page_cache_mode pcm)
{
switch (pcm) {
case _PAGE_CACHE_MODE_UC: return "uncached";
case _PAGE_CACHE_MODE_UC_MINUS: return "uncached-minus";
case _PAGE_CACHE_MODE_WB: return "write-back";
case _PAGE_CACHE_MODE_WC: return "write-combining";
case _PAGE_CACHE_MODE_WT: return "write-through";
case _PAGE_CACHE_MODE_WP: return "write-protected";
default: return "broken";
}
}
#ifdef CONFIG_X86_PAT
extern int memtype_check_insert(struct memtype *entry_new,
enum page_cache_mode *new_type);
extern struct memtype *memtype_erase(u64 start, u64 end);
extern struct memtype *memtype_lookup(u64 addr);
extern int memtype_copy_nth_element(struct memtype *entry_out, loff_t pos);
#else
static inline int memtype_check_insert(struct memtype *entry_new,
enum page_cache_mode *new_type)
{ return 0; }
static inline struct memtype *memtype_erase(u64 start, u64 end)
{ return NULL; }
static inline struct memtype *memtype_lookup(u64 addr)
{ return NULL; }
static inline int memtype_copy_nth_element(struct memtype *out, loff_t pos)
{ return 0; }
#endif
#endif /* __MEMTYPE_H_ */
Annotation
- Detected declarations: `struct memtype`, `function memtype_check_insert`, `function memtype_copy_nth_element`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.