drivers/perf/riscv_pmu_sbi.c
Source file repositories/reference/linux-study-clean/drivers/perf/riscv_pmu_sbi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/perf/riscv_pmu_sbi.c- Extension
.c- Size
- 47085 bytes
- Lines
- 1573
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/mod_devicetable.hlinux/perf/riscv_pmu.hlinux/platform_device.hlinux/irq.hlinux/irqdomain.hlinux/of_irq.hlinux/of.hlinux/cpu_pm.hlinux/sched/clock.hlinux/soc/andes/irq.hlinux/workqueue.hasm/errata_list.hasm/sbi.hasm/cpufeature.hasm/vendor_extensions.hasm/vendor_extensions/andes.h
Detected Declarations
struct sbi_pmu_event_datastruct hw_gen_eventstruct hw_cache_eventfunction pmu_sbi_check_event_infofunction pmu_sbi_check_eventfunction pmu_sbi_check_std_eventsfunction pmu_sbi_ctr_get_widthfunction pmu_sbi_ctr_is_fwfunction riscv_pmu_get_event_infofunction riscv_pmu_get_hpm_infofunction for_each_set_bitfunction pmu_sbi_csr_indexfunction pmu_sbi_get_filter_flagsfunction pmu_sbi_ctr_get_idxfunction pmu_sbi_ctr_clear_idxfunction pmu_event_find_cachefunction pmu_sbi_is_fw_eventfunction pmu_sbi_event_mapfunction pmu_sbi_snapshot_freefunction for_each_possible_cpufunction pmu_sbi_snapshot_allocfunction for_each_possible_cpufunction pmu_sbi_snapshot_disablefunction pmu_sbi_snapshot_setupfunction pmu_sbi_ctr_readfunction pmu_sbi_set_scounterenfunction pmu_sbi_reset_scounterenfunction pmu_sbi_ctr_startfunction pmu_sbi_ctr_stopfunction pmu_sbi_find_num_ctrsfunction pmu_sbi_get_ctrinfofunction pmu_sbi_stop_allfunction pmu_sbi_stop_hw_ctrsfunction pmu_sbi_start_ovf_ctrs_sbifunction pmu_sbi_start_ovf_ctrs_snapshotfunction for_each_set_bitfunction pmu_sbi_start_overflow_maskfunction pmu_sbi_ovf_handlerfunction for_each_set_bitfunction pmu_sbi_starting_cpufunction pmu_sbi_dying_cpufunction pmu_sbi_setup_irqsfunction riscv_cached_mvendoridfunction IS_ENABLEDfunction riscv_pm_pmu_notifyfunction riscv_pm_pmu_registerfunction riscv_pm_pmu_unregisterfunction riscv_pm_pmu_register
Annotated Snippet
device_initcall(pmu_sbi_devinit)
Annotation
- Immediate include surface: `linux/mod_devicetable.h`, `linux/perf/riscv_pmu.h`, `linux/platform_device.h`, `linux/irq.h`, `linux/irqdomain.h`, `linux/of_irq.h`, `linux/of.h`, `linux/cpu_pm.h`.
- Detected declarations: `struct sbi_pmu_event_data`, `struct hw_gen_event`, `struct hw_cache_event`, `function pmu_sbi_check_event_info`, `function pmu_sbi_check_event`, `function pmu_sbi_check_std_events`, `function pmu_sbi_ctr_get_width`, `function pmu_sbi_ctr_is_fw`, `function riscv_pmu_get_event_info`, `function riscv_pmu_get_hpm_info`.
- Atlas domain: Driver Families / drivers/perf.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.