drivers/macintosh/rack-meter.c
Source file repositories/reference/linux-study-clean/drivers/macintosh/rack-meter.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/macintosh/rack-meter.c- Extension
.c- Size
- 15704 bytes
- Lines
- 618
- Domain
- Driver Families
- Bucket
- drivers/macintosh
- 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.
- 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/types.hlinux/kernel.hlinux/slab.hlinux/device.hlinux/interrupt.hlinux/module.hlinux/pci.hlinux/dma-mapping.hlinux/kernel_stat.hlinux/of_address.hlinux/of_irq.hasm/io.hasm/machdep.hasm/pmac_feature.hasm/dbdma.hasm/macio.hasm/keylargo.h
Detected Declarations
struct rackmeter_dmastruct rackmeter_cpustruct rackmeterfunction get_cpu_idle_timefunction rackmeter_setup_i2sfunction rackmeter_set_default_patternfunction rackmeter_do_pausefunction rackmeter_setup_dbdmafunction rackmeter_do_timerfunction rackmeter_init_cpu_snifferfunction for_each_online_cpufunction rackmeter_stop_cpu_snifferfunction rackmeter_setupfunction rackmeter_calc_samplefunction rackmeter_irqfunction rackmeter_probefunction of_address_to_resourcefunction rackmeter_removefunction rackmeter_shutdownfunction rackmeter_initfunction rackmeter_exitmodule init rackmeter_init
Annotated Snippet
module_init(rackmeter_init);
module_exit(rackmeter_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("RackMeter: Support vu-meter on XServe front panel");
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/slab.h`, `linux/device.h`, `linux/interrupt.h`, `linux/module.h`, `linux/pci.h`, `linux/dma-mapping.h`.
- Detected declarations: `struct rackmeter_dma`, `struct rackmeter_cpu`, `struct rackmeter`, `function get_cpu_idle_time`, `function rackmeter_setup_i2s`, `function rackmeter_set_default_pattern`, `function rackmeter_do_pause`, `function rackmeter_setup_dbdma`, `function rackmeter_do_timer`, `function rackmeter_init_cpu_sniffer`.
- Atlas domain: Driver Families / drivers/macintosh.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.