drivers/perf/thunderx2_pmu.c
Source file repositories/reference/linux-study-clean/drivers/perf/thunderx2_pmu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/perf/thunderx2_pmu.c- Extension
.c- Size
- 27830 bytes
- Lines
- 1045
- Domain
- Driver Families
- Bucket
- drivers/perf
- 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.
- 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/acpi.hlinux/cpuhotplug.hlinux/perf_event.hlinux/platform_device.h
Detected Declarations
struct tx2_uncore_pmuenum tx2_uncore_typefunction tx2_pmu_event_showfunction cpumask_showfunction reg_readlfunction reg_writelfunction alloc_counterfunction free_counterfunction init_cntr_base_l3cfunction init_cntr_base_dmcfunction init_cntr_base_ccpi2function uncore_start_event_l3cfunction uncore_stop_event_l3cfunction uncore_start_event_dmcfunction uncore_stop_event_dmcfunction uncore_start_event_ccpi2function uncore_stop_event_ccpi2function tx2_uncore_event_updatefunction get_tx2_pmu_typefunction tx2_uncore_validate_eventfunction tx2_uncore_validate_event_groupfunction for_each_sibling_eventfunction tx2_uncore_event_initfunction tx2_uncore_event_startfunction tx2_uncore_event_stopfunction tx2_uncore_event_addfunction tx2_uncore_event_delfunction tx2_uncore_event_readfunction tx2_hrtimer_callbackfunction for_each_set_bitfunction tx2_uncore_pmu_registerfunction tx2_uncore_pmu_add_devfunction list_for_each_entryfunction tx2_uncore_pmu_addfunction tx2_uncore_pmu_online_cpufunction tx2_uncore_pmu_offline_cpufunction tx2_uncore_probefunction tx2_uncore_removefunction tx2_uncore_driver_initfunction tx2_uncore_driver_exitmodule init tx2_uncore_driver_init
Annotated Snippet
module_init(tx2_uncore_driver_init);
static void __exit tx2_uncore_driver_exit(void)
{
platform_driver_unregister(&tx2_uncore_driver);
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CAVIUM_TX2_UNCORE_ONLINE);
}
module_exit(tx2_uncore_driver_exit);
MODULE_DESCRIPTION("ThunderX2 UNCORE PMU driver");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Ganapatrao Kulkarni <gkulkarni@cavium.com>");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/cpuhotplug.h`, `linux/perf_event.h`, `linux/platform_device.h`.
- Detected declarations: `struct tx2_uncore_pmu`, `enum tx2_uncore_type`, `function tx2_pmu_event_show`, `function cpumask_show`, `function reg_readl`, `function reg_writel`, `function alloc_counter`, `function free_counter`, `function init_cntr_base_l3c`, `function init_cntr_base_dmc`.
- Atlas domain: Driver Families / drivers/perf.
- 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.