cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

dma-direct.h (391B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef ASM_POWERPC_DMA_DIRECT_H
      3#define ASM_POWERPC_DMA_DIRECT_H 1
      4
      5static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
      6{
      7	return paddr + dev->archdata.dma_offset;
      8}
      9
     10static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
     11{
     12	return daddr - dev->archdata.dma_offset;
     13}
     14#endif /* ASM_POWERPC_DMA_DIRECT_H */