drivers/powercap/intel_rapl_msr.c
Source file repositories/reference/linux-study-clean/drivers/powercap/intel_rapl_msr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/powercap/intel_rapl_msr.c- Extension
.c- Size
- 21163 bytes
- Lines
- 603
- Domain
- Driver Families
- Bucket
- drivers/powercap
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/kernel.hlinux/module.hlinux/list.hlinux/types.hlinux/device.hlinux/slab.hlinux/log2.hlinux/bitmap.hlinux/delay.hlinux/sysfs.hlinux/cpu.hlinux/powercap.hlinux/suspend.hlinux/intel_rapl.hlinux/processor.hlinux/platform_device.hlinux/units.hlinux/bits.hasm/cpu_device_id.hasm/intel-family.hasm/iosf_mbi.hasm/msr.h
Detected Declarations
function rapl_cpu_onlinefunction rapl_cpu_down_prepfunction rapl_msr_read_rawfunction rapl_msr_update_funcfunction rapl_msr_write_rawfunction rapl_check_unit_atomfunction set_floor_freq_atomfunction rapl_compute_time_window_atomfunction rapl_msr_probefunction rapl_msr_removefunction intel_rapl_msr_initfunction intel_rapl_msr_exitmodule init intel_rapl_msr_init
Annotated Snippet
module_init(intel_rapl_msr_init);
static void intel_rapl_msr_exit(void)
{
platform_device_unregister(rapl_msr_platdev);
platform_driver_unregister(&intel_rapl_msr_driver);
}
module_exit(intel_rapl_msr_exit);
MODULE_DESCRIPTION("Driver for Intel RAPL (Running Average Power Limit) control via MSR interface");
MODULE_AUTHOR("Zhang Rui <rui.zhang@intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS("INTEL_RAPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/list.h`, `linux/types.h`, `linux/device.h`, `linux/slab.h`, `linux/log2.h`, `linux/bitmap.h`.
- Detected declarations: `function rapl_cpu_online`, `function rapl_cpu_down_prep`, `function rapl_msr_read_raw`, `function rapl_msr_update_func`, `function rapl_msr_write_raw`, `function rapl_check_unit_atom`, `function set_floor_freq_atom`, `function rapl_compute_time_window_atom`, `function rapl_msr_probe`, `function rapl_msr_remove`.
- Atlas domain: Driver Families / drivers/powercap.
- 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.