arch/arm/kernel/smp_tlb.c
Source file repositories/reference/linux-study-clean/arch/arm/kernel/smp_tlb.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/kernel/smp_tlb.c- Extension
.c- Size
- 6299 bytes
- Lines
- 254
- 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/preempt.hlinux/smp.hlinux/uaccess.hasm/smp_plat.hasm/tlbflush.hasm/mmu_context.h
Detected Declarations
struct tlb_argsfunction ipi_flush_tlb_allfunction ipi_flush_tlb_mmfunction ipi_flush_tlb_pagefunction ipi_flush_tlb_kernel_pagefunction ipi_flush_tlb_rangefunction ipi_flush_tlb_kernel_rangefunction ipi_flush_bp_allfunction erratum_a15_798181_partialfunction erratum_a15_798181_broadcastfunction erratum_a15_798181_initfunction ipi_flush_tlb_a15_erratumfunction broadcast_tlb_a15_erratumfunction broadcast_tlb_mm_a15_erratumfunction flush_tlb_allfunction flush_tlb_mmfunction flush_tlb_pagefunction flush_tlb_kernel_pagefunction flush_tlb_rangefunction flush_tlb_kernel_rangefunction flush_bp_all
Annotated Snippet
struct tlb_args {
struct vm_area_struct *ta_vma;
unsigned long ta_start;
unsigned long ta_end;
};
static inline void ipi_flush_tlb_all(void *ignored)
{
local_flush_tlb_all();
}
static inline void ipi_flush_tlb_mm(void *arg)
{
struct mm_struct *mm = (struct mm_struct *)arg;
local_flush_tlb_mm(mm);
}
static inline void ipi_flush_tlb_page(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
unsigned int __ua_flags = uaccess_save_and_enable();
local_flush_tlb_page(ta->ta_vma, ta->ta_start);
uaccess_restore(__ua_flags);
}
static inline void ipi_flush_tlb_kernel_page(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
local_flush_tlb_kernel_page(ta->ta_start);
}
static inline void ipi_flush_tlb_range(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
unsigned int __ua_flags = uaccess_save_and_enable();
local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);
uaccess_restore(__ua_flags);
}
static inline void ipi_flush_tlb_kernel_range(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
local_flush_tlb_kernel_range(ta->ta_start, ta->ta_end);
}
static inline void ipi_flush_bp_all(void *ignored)
{
local_flush_bp_all();
}
#ifdef CONFIG_ARM_ERRATA_798181
bool (*erratum_a15_798181_handler)(void);
static bool erratum_a15_798181_partial(void)
{
asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0));
dsb(ish);
return false;
}
static bool erratum_a15_798181_broadcast(void)
{
asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0));
dsb(ish);
return true;
}
void erratum_a15_798181_init(void)
{
unsigned int midr = read_cpuid_id();
unsigned int revidr = read_cpuid(CPUID_REVIDR);
/* Brahma-B15 r0p0..r0p2 affected
* Cortex-A15 r0p0..r3p3 w/o ECO fix affected
* Fixes applied to A15 with respect to the revision and revidr are:
*
* r0p0-r2p1: No fixes applied
* r2p2,r2p3:
* REVIDR[4]: 798181 Moving a virtual page that is being accessed
* by an active process can lead to unexpected behavior
* REVIDR[9]: Not defined
* r2p4,r3p0,r3p1,r3p2:
* REVIDR[4]: 798181 Moving a virtual page that is being accessed
Annotation
- Immediate include surface: `linux/preempt.h`, `linux/smp.h`, `linux/uaccess.h`, `asm/smp_plat.h`, `asm/tlbflush.h`, `asm/mmu_context.h`.
- Detected declarations: `struct tlb_args`, `function ipi_flush_tlb_all`, `function ipi_flush_tlb_mm`, `function ipi_flush_tlb_page`, `function ipi_flush_tlb_kernel_page`, `function ipi_flush_tlb_range`, `function ipi_flush_tlb_kernel_range`, `function ipi_flush_bp_all`, `function erratum_a15_798181_partial`, `function erratum_a15_798181_broadcast`.
- 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.