arch/m68k/kernel/dma.c
Source file repositories/reference/linux-study-clean/arch/m68k/kernel/dma.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/kernel/dma.c- Extension
.c- Size
- 1040 bytes
- Lines
- 46
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma-map-ops.hlinux/kernel.hasm/cacheflush.h
Detected Declarations
function arch_dma_prep_coherentfunction pgprot_dmacoherentfunction arch_sync_dma_for_device
Annotated Snippet
#include <linux/dma-map-ops.h>
#include <linux/kernel.h>
#include <asm/cacheflush.h>
#ifndef CONFIG_COLDFIRE
void arch_dma_prep_coherent(struct page *page, size_t size)
{
cache_push(page_to_phys(page), size);
}
pgprot_t pgprot_dmacoherent(pgprot_t prot)
{
if (CPU_IS_040_OR_060) {
pgprot_val(prot) &= ~_PAGE_CACHE040;
pgprot_val(prot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
} else {
pgprot_val(prot) |= _PAGE_NOCACHE030;
}
return prot;
}
#endif /* CONFIG_MMU && !CONFIG_COLDFIRE */
void arch_sync_dma_for_device(phys_addr_t handle, size_t size,
enum dma_data_direction dir)
{
switch (dir) {
case DMA_BIDIRECTIONAL:
case DMA_TO_DEVICE:
cache_push(handle, size);
break;
case DMA_FROM_DEVICE:
cache_clear(handle, size);
break;
default:
pr_err_ratelimited("dma_sync_single_for_device: unsupported dir %u\n",
dir);
break;
}
}
Annotation
- Immediate include surface: `linux/dma-map-ops.h`, `linux/kernel.h`, `asm/cacheflush.h`.
- Detected declarations: `function arch_dma_prep_coherent`, `function pgprot_dmacoherent`, `function arch_sync_dma_for_device`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: source implementation candidate.
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.