drivers/cpufreq/powernv-cpufreq.c
Source file repositories/reference/linux-study-clean/drivers/cpufreq/powernv-cpufreq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/cpufreq/powernv-cpufreq.c- Extension
.c- Size
- 31269 bytes
- Lines
- 1161
- Domain
- Driver Families
- Bucket
- drivers/cpufreq
- 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/kernel.hlinux/sysfs.hlinux/cpumask.hlinux/module.hlinux/cpufreq.hlinux/smp.hlinux/of.hlinux/reboot.hlinux/slab.hlinux/string_choices.hlinux/cpu.hlinux/hashtable.hasm/cputhreads.hasm/firmware.hasm/reg.hasm/smp.hasm/opal.hlinux/timer.hpowernv-trace.h
Detected Declarations
struct global_pstate_infostruct pstate_idx_revmap_datastruct powernv_smp_call_dataenum throttle_reason_typefunction extract_pstatefunction idx_to_pstatefunction pstate_to_idxfunction hash_for_each_possiblefunction reset_gpstatesfunction init_powernv_pstatesfunction pstate_id_to_freqfunction cpuinfo_nominal_freq_showfunction get_pmsprfunction set_pmsprfunction powernv_read_cpu_freqfunction powernv_cpufreq_getfunction set_pstatefunction get_nominal_indexfunction powernv_cpufreq_throttle_checkfunction calc_global_pstatefunction queue_gpstate_timerfunction gpstate_timer_handlerfunction powernv_cpufreq_target_indexfunction powernv_cpufreq_cpu_initfunction powernv_cpufreq_cpu_exitfunction powernv_cpufreq_reboot_notifierfunction powernv_cpufreq_work_fnfunction powernv_cpufreq_occ_msgfunction powernv_cpufreq_throttle_checkfunction powernv_fast_switchfunction init_chip_infofunction for_each_possible_cpufunction clean_chip_infofunction unregister_all_notifiersfunction powernv_cpufreq_initfunction powernv_cpufreq_exitmodule init powernv_cpufreq_init
Annotated Snippet
module_init(powernv_cpufreq_init);
static void __exit powernv_cpufreq_exit(void)
{
cpufreq_unregister_driver(&powernv_cpufreq_driver);
unregister_all_notifiers();
clean_chip_info();
}
module_exit(powernv_cpufreq_exit);
MODULE_DESCRIPTION("cpufreq driver for IBM/OpenPOWER powernv systems");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/sysfs.h`, `linux/cpumask.h`, `linux/module.h`, `linux/cpufreq.h`, `linux/smp.h`, `linux/of.h`, `linux/reboot.h`.
- Detected declarations: `struct global_pstate_info`, `struct pstate_idx_revmap_data`, `struct powernv_smp_call_data`, `enum throttle_reason_type`, `function extract_pstate`, `function idx_to_pstate`, `function pstate_to_idx`, `function hash_for_each_possible`, `function reset_gpstates`, `function init_powernv_pstates`.
- Atlas domain: Driver Families / drivers/cpufreq.
- 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.