arch/x86/events/amd/power.c
Source file repositories/reference/linux-study-clean/arch/x86/events/amd/power.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/events/amd/power.c- Extension
.c- Size
- 7310 bytes
- Lines
- 310
- 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.hasm/cpu_device_id.hasm/cpuid/api.hasm/msr.h../perf_event.h
Detected Declarations
function event_updatefunction valuefunction __pmu_event_startfunction pmu_event_startfunction pmu_event_stopfunction pmu_event_addfunction pmu_event_delfunction pmu_event_initfunction pmu_event_readfunction get_attr_cpumaskfunction power_cpu_exitfunction power_cpu_initfunction amd_power_pmu_initfunction amd_power_pmu_exitmodule init amd_power_pmu_init
Annotated Snippet
module_init(amd_power_pmu_init);
static void __exit amd_power_pmu_exit(void)
{
cpuhp_remove_state_nocalls(CPUHP_AP_PERF_X86_AMD_POWER_ONLINE);
perf_pmu_unregister(&pmu_class);
}
module_exit(amd_power_pmu_exit);
MODULE_AUTHOR("Huang Rui <ray.huang@amd.com>");
MODULE_DESCRIPTION("AMD Processor Power Reporting Mechanism");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/perf_event.h`, `asm/cpu_device_id.h`, `asm/cpuid/api.h`, `asm/msr.h`, `../perf_event.h`.
- Detected declarations: `function event_update`, `function value`, `function __pmu_event_start`, `function pmu_event_start`, `function pmu_event_stop`, `function pmu_event_add`, `function pmu_event_del`, `function pmu_event_init`, `function pmu_event_read`, `function get_attr_cpumask`.
- 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.