arch/arm/include/asm/arm_pmuv3.h
Source file repositories/reference/linux-study-clean/arch/arm/include/asm/arm_pmuv3.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/include/asm/arm_pmuv3.h- Extension
.h- Size
- 7793 bytes
- Lines
- 288
- 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
asm/cp15.hasm/cputype.h
Detected Declarations
function Copyrightfunction write_pmevcntrnfunction write_pmevtypernfunction read_pmmirfunction read_pmuverfunction pmuv3_has_icntrfunction write_pmcrfunction read_pmcrfunction write_pmselrfunction write_pmccntrfunction read_pmccntrfunction write_pmicntrfunction write_pmcntensetfunction write_pmcntenclrfunction write_pmintensetfunction write_pmintenclrfunction write_pmccfiltrfunction write_pmicfiltrfunction write_pmovsclrfunction read_pmovsclrfunction write_pmuserenrfunction write_pmuacrfunction kvm_set_pmuserenrfunction kvm_vcpu_pmu_resync_el0function is_pmuv3p4function is_pmuv3p5function is_pmuv3p9function read_pmceid0function read_pmceid1
Annotated Snippet
static inline void write_pmicntr(u64 val) {}
static inline u64 read_pmicntr(void)
{
return 0;
}
static inline void write_pmcntenset(u32 val)
{
write_sysreg(val, PMCNTENSET);
}
static inline void write_pmcntenclr(u32 val)
{
write_sysreg(val, PMCNTENCLR);
}
static inline void write_pmintenset(u32 val)
{
write_sysreg(val, PMINTENSET);
}
static inline void write_pmintenclr(u32 val)
{
write_sysreg(val, PMINTENCLR);
}
static inline void write_pmccfiltr(u32 val)
{
write_sysreg(val, PMCCFILTR);
}
static inline void write_pmicfiltr(u64 val) {}
static inline u64 read_pmicfiltr(void)
{
return 0;
}
static inline void write_pmovsclr(u32 val)
{
write_sysreg(val, PMOVSR);
}
static inline u32 read_pmovsclr(void)
{
return read_sysreg(PMOVSR);
}
static inline void write_pmuserenr(u32 val)
{
write_sysreg(val, PMUSERENR);
}
static inline void write_pmuacr(u64 val) {}
static inline void kvm_set_pmu_events(u32 set, struct perf_event_attr *attr) {}
static inline void kvm_clr_pmu_events(u32 clr) {}
static inline bool kvm_pmu_counter_deferred(struct perf_event_attr *attr)
{
return false;
}
static inline bool kvm_set_pmuserenr(u64 val)
{
return false;
}
static inline void kvm_vcpu_pmu_resync_el0(void) {}
/* PMU Version in DFR Register */
#define ARMV8_PMU_DFR_VER_NI 0
#define ARMV8_PMU_DFR_VER_V3P1 0x4
#define ARMV8_PMU_DFR_VER_V3P4 0x5
#define ARMV8_PMU_DFR_VER_V3P5 0x6
#define ARMV8_PMU_DFR_VER_V3P9 0x9
#define ARMV8_PMU_DFR_VER_IMP_DEF 0xF
static inline bool pmuv3_implemented(int pmuver)
{
/*
* PMUVer follows the standard ID scheme for an unsigned field with the
* exception of 0xF (IMP_DEF) which is treated specially and implies
* FEAT_PMUv3 is not implemented.
*
* See DDI0487L.a D24.1.3.2 for more details.
*/
return !(pmuver == ARMV8_PMU_DFR_VER_IMP_DEF ||
pmuver == ARMV8_PMU_DFR_VER_NI);
}
Annotation
- Immediate include surface: `asm/cp15.h`, `asm/cputype.h`.
- Detected declarations: `function Copyright`, `function write_pmevcntrn`, `function write_pmevtypern`, `function read_pmmir`, `function read_pmuver`, `function pmuv3_has_icntr`, `function write_pmcr`, `function read_pmcr`, `function write_pmselr`, `function write_pmccntr`.
- 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.