drivers/dma-buf/heaps/system_heap.c
Source file repositories/reference/linux-study-clean/drivers/dma-buf/heaps/system_heap.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma-buf/heaps/system_heap.c- Extension
.c- Size
- 13022 bytes
- Lines
- 549
- Domain
- Driver Families
- Bucket
- drivers/dma-buf
- 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/cc_platform.hlinux/dma-buf.hlinux/dma-mapping.hlinux/dma-heap.hlinux/err.hlinux/highmem.hlinux/mem_encrypt.hlinux/mm.hlinux/set_memory.hlinux/module.hlinux/pgtable.hlinux/scatterlist.hlinux/slab.hlinux/vmalloc.h
Detected Declarations
struct system_heap_privstruct system_heap_bufferstruct dma_heap_attachmentfunction system_heap_set_page_decryptedfunction system_heap_set_page_encryptedfunction dup_sg_tablefunction system_heap_attachfunction system_heap_detachfunction system_heap_unmap_dma_buffunction system_heap_dma_buf_begin_cpu_accessfunction list_for_each_entryfunction system_heap_dma_buf_end_cpu_accessfunction list_for_each_entryfunction system_heap_mmapfunction for_each_sgtable_sgfunction for_each_sgtable_pagefunction system_heap_vmapfunction system_heap_vunmapfunction system_heap_dma_buf_releasefunction system_heap_createmodule init system_heap_create
Annotated Snippet
module_init(system_heap_create);
MODULE_DESCRIPTION("DMA-BUF System Heap");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("DMA_BUF");
MODULE_IMPORT_NS("DMA_BUF_HEAP");
Annotation
- Immediate include surface: `linux/cc_platform.h`, `linux/dma-buf.h`, `linux/dma-mapping.h`, `linux/dma-heap.h`, `linux/err.h`, `linux/highmem.h`, `linux/mem_encrypt.h`, `linux/mm.h`.
- Detected declarations: `struct system_heap_priv`, `struct system_heap_buffer`, `struct dma_heap_attachment`, `function system_heap_set_page_decrypted`, `function system_heap_set_page_encrypted`, `function dup_sg_table`, `function system_heap_attach`, `function system_heap_detach`, `function system_heap_unmap_dma_buf`, `function system_heap_dma_buf_begin_cpu_access`.
- Atlas domain: Driver Families / drivers/dma-buf.
- 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.