/* SPDX-License-Identifier: GPL-2.0 */ /* * Internals of the DMA direct mapping implementation. Only for use by the * DMA mapping code and IOMMU drivers.
*/ #ifndef _LINUX_DMA_DIRECT_H #define _LINUX_DMA_DIRECT_H 1
/* * Record the mapping of CPU physical to DMA addresses for a given region.
*/ struct bus_dma_region {
phys_addr_t cpu_start;
dma_addr_t dma_start;
u64 size;
};
staticinline dma_addr_t phys_to_dma_unencrypted(struct device *dev,
phys_addr_t paddr)
{ return dma_addr_unencrypted(__phys_to_dma(dev, paddr));
} /* * If memory encryption is supported, phys_to_dma will set the memory encryption * bit in the DMA address, and dma_to_phys will clear it. * phys_to_dma_unencrypted is for use on special unencrypted memory like swiotlb * buffers.
*/ staticinline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
{ return dma_addr_encrypted(__phys_to_dma(dev, paddr));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.