arch/x86/events/intel/cstate.c
Source file repositories/reference/linux-study-clean/arch/x86/events/intel/cstate.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/events/intel/cstate.c- Extension
.c- Size
- 24742 bytes
- Lines
- 788
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/slab.hlinux/perf_event.hlinux/nospec.hasm/cpu_device_id.hasm/intel-family.hasm/msr.h../perf_event.h../probe.h
Detected Declarations
struct cstate_modelenum perf_cstate_core_eventsenum perf_cstate_pkg_eventsenum perf_cstate_module_eventsfunction test_msrfunction cstate_pmu_event_initfunction cstate_pmu_read_counterfunction cstate_pmu_event_updatefunction cstate_pmu_event_startfunction cstate_pmu_event_stopfunction cstate_pmu_event_delfunction cstate_pmu_event_addfunction cstate_probefunction cstate_cleanupfunction cstate_initfunction cstate_pmu_initfunction cstate_pmu_exitmodule init cstate_pmu_init
Annotated Snippet
module_init(cstate_pmu_init);
static void __exit cstate_pmu_exit(void)
{
cstate_cleanup();
}
module_exit(cstate_pmu_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/perf_event.h`, `linux/nospec.h`, `asm/cpu_device_id.h`, `asm/intel-family.h`, `asm/msr.h`, `../perf_event.h`.
- Detected declarations: `struct cstate_model`, `enum perf_cstate_core_events`, `enum perf_cstate_pkg_events`, `enum perf_cstate_module_events`, `function test_msr`, `function cstate_pmu_event_init`, `function cstate_pmu_read_counter`, `function cstate_pmu_event_update`, `function cstate_pmu_event_start`, `function cstate_pmu_event_stop`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: integration 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.