arch/arm/include/asm/tlbflush.h
Source file repositories/reference/linux-study-clean/arch/arm/include/asm/tlbflush.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/include/asm/tlbflush.h- Extension
.h- Size
- 18082 bytes
- Lines
- 682
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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/mm_types.hasm/glue.hlinux/sched.h
Detected Declarations
struct cpu_tlb_fnsfunction __local_flush_tlb_allfunction local_flush_tlb_allfunction __flush_tlb_allfunction __local_flush_tlb_mmfunction local_flush_tlb_mmfunction __flush_tlb_mmfunction __local_flush_tlb_pagefunction local_flush_tlb_pagefunction __flush_tlb_pagefunction __local_flush_tlb_kernel_pagefunction local_flush_tlb_kernel_pagefunction __flush_tlb_kernel_pagefunction __local_flush_bp_allfunction local_flush_bp_allfunction __flush_bp_allfunction entryfunction clean_pmd_entryfunction update_mmu_cache_rangefunction erratum_a15_798181_initfunction erratum_a15_798181
Annotated Snippet
struct cpu_tlb_fns {
void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *);
void (*flush_kern_range)(unsigned long, unsigned long);
unsigned long tlb_flags;
};
/*
* Select the calling method
*/
#ifdef MULTI_TLB
#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
#define __cpu_flush_kern_tlb_range cpu_tlb.flush_kern_range
#else
#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
#define __cpu_flush_kern_tlb_range __glue(_TLB,_flush_kern_tlb_range)
extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
extern void __cpu_flush_kern_tlb_range(unsigned long, unsigned long);
#endif
extern struct cpu_tlb_fns cpu_tlb;
#define __cpu_tlb_flags cpu_tlb.tlb_flags
/*
* TLB Management
* ==============
*
* The arch/arm/mm/tlb-*.S files implement these methods.
*
* The TLB specific code is expected to perform whatever tests it
* needs to determine if it should invalidate the TLB for each
* call. Start addresses are inclusive and end addresses are
* exclusive; it is safe to round these addresses down.
*
* flush_tlb_all()
*
* Invalidate the entire TLB.
*
* flush_tlb_mm(mm)
*
* Invalidate all TLB entries in a particular address
* space.
* - mm - mm_struct describing address space
*
* flush_tlb_range(vma,start,end)
*
* Invalidate a range of TLB entries in the specified
* address space.
* - mm - mm_struct describing address space
* - start - start address (may not be aligned)
* - end - end address (exclusive, may not be aligned)
*
* flush_tlb_page(vma, uaddr)
*
* Invalidate the specified page in the specified address range.
* - vma - vm_area_struct describing address range
* - vaddr - virtual address (may not be aligned)
*/
/*
* We optimise the code below by:
* - building a set of TLB flags that might be set in __cpu_tlb_flags
* - building a set of TLB flags that will always be set in __cpu_tlb_flags
* - if we're going to need __cpu_tlb_flags, access it once and only once
*
* This allows us to build optimal assembly for the single-CPU type case,
* and as close to optimal given the compiler constrants for multi-CPU
* case. We could do better for the multi-CPU case if the compiler
* implemented the "%?" method, but this has been discontinued due to too
* many people getting it wrong.
*/
#define possible_tlb_flags (v4_possible_flags | \
v4wbi_possible_flags | \
fr_possible_flags | \
v4wb_possible_flags | \
fa_possible_flags | \
v6wbi_possible_flags | \
v7wbi_possible_flags)
#define always_tlb_flags (v4_always_flags & \
v4wbi_always_flags & \
fr_always_flags & \
v4wb_always_flags & \
fa_always_flags & \
v6wbi_always_flags & \
Annotation
- Immediate include surface: `linux/mm_types.h`, `asm/glue.h`, `linux/sched.h`.
- Detected declarations: `struct cpu_tlb_fns`, `function __local_flush_tlb_all`, `function local_flush_tlb_all`, `function __flush_tlb_all`, `function __local_flush_tlb_mm`, `function local_flush_tlb_mm`, `function __flush_tlb_mm`, `function __local_flush_tlb_page`, `function local_flush_tlb_page`, `function __flush_tlb_page`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.