kernel/dma/coherent.c
Source file repositories/reference/linux-study-clean/kernel/dma/coherent.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/dma/coherent.c- Extension
.c- Size
- 11500 bytes
- Lines
- 411
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/io.hlinux/slab.hlinux/kernel.hlinux/module.hlinux/dma-direct.hlinux/dma-map-ops.hlinux/of.hlinux/of_fdt.hlinux/of_reserved_mem.h
Detected Declarations
struct dma_coherent_memfunction dma_get_device_basefunction _dma_release_coherent_memoryfunction dma_assign_coherent_memoryfunction dma_alloc_coherentfunction dma_release_coherent_memoryfunction dma_alloc_from_dev_coherentfunction __dma_release_from_coherentfunction dma_release_from_dev_coherentfunction __dma_mmap_from_coherentfunction dma_mmap_from_dev_coherentfunction dma_release_from_global_coherentfunction dma_mmap_from_global_coherentfunction dma_init_global_coherentfunction rmem_dma_device_initfunction rmem_dma_device_releasefunction rmem_dma_setupfunction dma_init_reserved_memorymodule init dma_init_reserved_memory
Annotated Snippet
core_initcall(dma_init_reserved_memory);
#endif /* CONFIG_DMA_GLOBAL_POOL */
static const struct reserved_mem_ops rmem_dma_ops = {
.node_init = rmem_dma_setup,
.device_init = rmem_dma_device_init,
.device_release = rmem_dma_device_release,
};
RESERVEDMEM_OF_DECLARE(dma, "shared-dma-pool", &rmem_dma_ops);
#endif
Annotation
- Immediate include surface: `linux/io.h`, `linux/slab.h`, `linux/kernel.h`, `linux/module.h`, `linux/dma-direct.h`, `linux/dma-map-ops.h`, `linux/of.h`, `linux/of_fdt.h`.
- Detected declarations: `struct dma_coherent_mem`, `function dma_get_device_base`, `function _dma_release_coherent_memory`, `function dma_assign_coherent_memory`, `function dma_alloc_coherent`, `function dma_release_coherent_memory`, `function dma_alloc_from_dev_coherent`, `function __dma_release_from_coherent`, `function dma_release_from_dev_coherent`, `function __dma_mmap_from_coherent`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- 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.