drivers/dma/hisi_dma.c
Source file repositories/reference/linux-study-clean/drivers/dma/hisi_dma.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/hisi_dma.c- Extension
.c- Size
- 31052 bytes
- Lines
- 1054
- Domain
- Driver Families
- Bucket
- drivers/dma
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/bitfield.hlinux/dmaengine.hlinux/init.hlinux/iopoll.hlinux/module.hlinux/pci.hlinux/spinlock.hvirt-dma.hlinux/debugfs.h
Detected Declarations
struct hisi_dma_sqestruct hisi_dma_cqestruct hisi_dma_descstruct hisi_dma_chanstruct hisi_dma_devenum hisi_dma_reg_layoutenum hisi_dma_modeenum hisi_dma_chan_statusfunction hisi_dma_get_reg_layoutfunction hisi_dma_get_chan_numfunction hisi_dma_get_msi_numfunction hisi_dma_get_queue_basefunction hisi_dma_chan_writefunction hisi_dma_update_bitfunction hisi_dma_pause_dmafunction hisi_dma_enable_dmafunction hisi_dma_mask_irqfunction hisi_dma_unmask_irqfunction hisi_dma_do_resetfunction hisi_dma_reset_qp_pointfunction hisi_dma_reset_or_disable_hw_chanfunction hisi_dma_free_chan_resourcesfunction hisi_dma_desc_freefunction hisi_dma_prep_dma_memcpyfunction hisi_dma_tx_statusfunction hisi_dma_start_transferfunction hisi_dma_issue_pendingfunction hisi_dma_terminate_allfunction hisi_dma_synchronizefunction hisi_dma_alloc_qps_memfunction hisi_dma_init_hw_qpfunction hisi_dma_enable_qpfunction hisi_dma_disable_qpfunction hisi_dma_enable_qpsfunction hisi_dma_disable_qpsfunction hisi_dma_irqfunction hisi_dma_request_qps_irqfunction hisi_dma_enable_hw_channelsfunction hisi_dma_disable_hw_channelsfunction hisi_dma_set_modefunction hisi_dma_init_hwfunction hisi_dma_init_dma_devfunction hisi_dma_create_chan_dirfunction hisi_dma_create_debugfsfunction hisi_dma_create_debugfs
Annotated Snippet
static struct pci_driver hisi_dma_pci_driver = {
.name = "hisi_dma",
.id_table = hisi_dma_pci_tbl,
.probe = hisi_dma_probe,
};
module_pci_driver(hisi_dma_pci_driver);
MODULE_AUTHOR("Zhou Wang <wangzhou1@hisilicon.com>");
MODULE_AUTHOR("Zhenfa Qiu <qiuzhenfa@hisilicon.com>");
MODULE_DESCRIPTION("HiSilicon Kunpeng DMA controller driver");
MODULE_LICENSE("GPL v2");
MODULE_DEVICE_TABLE(pci, hisi_dma_pci_tbl);
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/dmaengine.h`, `linux/init.h`, `linux/iopoll.h`, `linux/module.h`, `linux/pci.h`, `linux/spinlock.h`, `virt-dma.h`.
- Detected declarations: `struct hisi_dma_sqe`, `struct hisi_dma_cqe`, `struct hisi_dma_desc`, `struct hisi_dma_chan`, `struct hisi_dma_dev`, `enum hisi_dma_reg_layout`, `enum hisi_dma_mode`, `enum hisi_dma_chan_status`, `function hisi_dma_get_reg_layout`, `function hisi_dma_get_chan_num`.
- Atlas domain: Driver Families / drivers/dma.
- Implementation status: pattern 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.