drivers/ps3/ps3-lpm.c
Source file repositories/reference/linux-study-clean/drivers/ps3/ps3-lpm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ps3/ps3-lpm.c- Extension
.c- Size
- 31183 bytes
- Lines
- 1239
- Domain
- Driver Families
- Bucket
- drivers/ps3
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/slab.hlinux/kernel.hlinux/module.hlinux/interrupt.hlinux/uaccess.hasm/smp.hasm/time.hasm/ps3.hasm/lv1call.hasm/cell-pmu.h
Detected Declarations
struct ps3_lpm_shadow_regsstruct ps3_lpm_privfunction ps3_set_bookmarkfunction ps3_set_pm_bookmarkfunction ps3_read_phys_ctrfunction ps3_write_phys_ctrfunction ps3_read_ctrfunction ps3_write_ctrfunction ps3_read_pm07_controlfunction ps3_write_pm07_controlfunction ps3_read_pmfunction ps3_write_pmfunction ps3_get_ctr_sizefunction ps3_set_ctr_sizefunction pm_translate_signal_group_number_on_island2function pm_translate_signal_group_number_on_island3function pm_translate_signal_group_number_on_island4function pm_translate_signal_group_number_on_island5function pm_translate_signal_group_number_on_island6function pm_translate_signal_group_number_on_island7function pm_translate_signal_group_number_on_island8function pm_signal_group_to_ps3_lv1_signal_groupfunction pm_bus_word_to_ps3_lv1_bus_wordfunction __ps3_set_signalfunction ps3_set_signalfunction ps3_get_hw_thread_idfunction ps3_enable_pmfunction ps3_disable_pmfunction ps3_lpm_copy_tbfunction ps3_lpm_copy_tb_to_userfunction ps3_get_and_clear_pm_interruptsfunction ps3_enable_pm_interruptsfunction ps3_disable_pm_interruptsfunction ps3_lpm_openfunction ps3_lpm_closefunction ps3_lpm_probefunction ps3_lpm_removefunction ps3_lpm_initfunction ps3_lpm_exitmodule init ps3_lpm_initexport ps3_set_bookmarkexport ps3_set_pm_bookmarkexport ps3_read_phys_ctrexport ps3_write_phys_ctrexport ps3_read_ctrexport ps3_write_ctrexport ps3_read_pm07_controlexport ps3_write_pm07_control
Annotated Snippet
module_init(ps3_lpm_init);
module_exit(ps3_lpm_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("PS3 Logical Performance Monitor Driver");
MODULE_AUTHOR("Sony Corporation");
MODULE_ALIAS(PS3_MODULE_ALIAS_LPM);
Annotation
- Immediate include surface: `linux/slab.h`, `linux/kernel.h`, `linux/module.h`, `linux/interrupt.h`, `linux/uaccess.h`, `asm/smp.h`, `asm/time.h`, `asm/ps3.h`.
- Detected declarations: `struct ps3_lpm_shadow_regs`, `struct ps3_lpm_priv`, `function ps3_set_bookmark`, `function ps3_set_pm_bookmark`, `function ps3_read_phys_ctr`, `function ps3_write_phys_ctr`, `function ps3_read_ctr`, `function ps3_write_ctr`, `function ps3_read_pm07_control`, `function ps3_write_pm07_control`.
- Atlas domain: Driver Families / drivers/ps3.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.