drivers/thermal/intel/x86_pkg_temp_thermal.c
Source file repositories/reference/linux-study-clean/drivers/thermal/intel/x86_pkg_temp_thermal.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/thermal/intel/x86_pkg_temp_thermal.c- Extension
.c- Size
- 14113 bytes
- Lines
- 535
- Domain
- Driver Families
- Bucket
- drivers/thermal
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/init.hlinux/intel_tcc.hlinux/err.hlinux/param.hlinux/device.hlinux/platform_device.hlinux/cpu.hlinux/smp.hlinux/slab.hlinux/pm.hlinux/thermal.hlinux/debugfs.hasm/cpu_device_id.hasm/cpuid/api.hasm/msr.hthermal_interrupt.h
Detected Declarations
struct zone_devicefunction pkg_temp_debugfs_initfunction sys_get_curr_tempfunction sys_set_trip_tempfunction pkg_thermal_rate_controlfunction enable_pkg_thres_interruptfunction disable_pkg_thres_interruptfunction pkg_temp_thermal_threshold_work_fnfunction pkg_thermal_schedule_workfunction pkg_thermal_notifyfunction pkg_temp_thermal_trips_initfunction pkg_temp_thermal_device_addfunction pkg_thermal_cpu_offlinefunction pkg_thermal_cpu_onlinefunction pkg_temp_thermal_initfunction pkg_temp_thermal_exitmodule init pkg_temp_thermal_init
Annotated Snippet
module_init(pkg_temp_thermal_init)
static void __exit pkg_temp_thermal_exit(void)
{
platform_thermal_package_notify = NULL;
platform_thermal_package_rate_control = NULL;
cpuhp_remove_state(pkg_thermal_hp_state);
debugfs_remove_recursive(debugfs);
kfree(zones);
}
module_exit(pkg_temp_thermal_exit)
MODULE_IMPORT_NS("INTEL_TCC");
MODULE_DESCRIPTION("X86 PKG TEMP Thermal Driver");
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/intel_tcc.h`, `linux/err.h`, `linux/param.h`, `linux/device.h`, `linux/platform_device.h`, `linux/cpu.h`.
- Detected declarations: `struct zone_device`, `function pkg_temp_debugfs_init`, `function sys_get_curr_temp`, `function sys_set_trip_temp`, `function pkg_thermal_rate_control`, `function enable_pkg_thres_interrupt`, `function disable_pkg_thres_interrupt`, `function pkg_temp_thermal_threshold_work_fn`, `function pkg_thermal_schedule_work`, `function pkg_thermal_notify`.
- Atlas domain: Driver Families / drivers/thermal.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.