mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Christoph Hellwig](/assets/img/avatar_default.png)
The __phys_to_dma vs phys_to_dma distinction isn't exactly obvious. Try to improve the situation by renaming __phys_to_dma to phys_to_dma_unencryped, and not forcing architectures that want to override phys_to_dma to actually provide __phys_to_dma. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
14 lines
391 B
C
14 lines
391 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef ASM_POWERPC_DMA_DIRECT_H
|
|
#define ASM_POWERPC_DMA_DIRECT_H 1
|
|
|
|
static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
|
|
{
|
|
return paddr + dev->archdata.dma_offset;
|
|
}
|
|
|
|
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
|
|
{
|
|
return daddr - dev->archdata.dma_offset;
|
|
}
|
|
#endif /* ASM_POWERPC_DMA_DIRECT_H */
|