arch/mips/loongson2ef/lemote-2f/dma.c

Source file repositories/reference/linux-study-clean/arch/mips/loongson2ef/lemote-2f/dma.c

File Facts

System
Linux kernel
Corpus path
arch/mips/loongson2ef/lemote-2f/dma.c
Extension
.c
Size
309 bytes
Lines
15
Domain
Architecture Layer
Bucket
arch/mips
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.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
#include <linux/dma-direct.h>

dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
{
	return paddr | 0x80000000;
}

phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
{
	if (dma_addr > 0x8fffffff)
		return dma_addr;
	return dma_addr & 0x0fffffff;
}

Annotation

Implementation Notes