|
@@ -12,7 +12,6 @@
|
|
|
#include <asm/io.h>
|
|
|
#include <asm/swiotlb.h>
|
|
|
#include <linux/dma-contiguous.h>
|
|
|
-#include <linux/mem_encrypt.h>
|
|
|
|
|
|
#ifdef CONFIG_ISA
|
|
|
# define ISA_DMA_BIT_MASK DMA_BIT_MASK(24)
|
|
@@ -42,31 +41,6 @@ extern void dma_generic_free_coherent(struct device *dev, size_t size,
|
|
|
void *vaddr, dma_addr_t dma_addr,
|
|
|
unsigned long attrs);
|
|
|
|
|
|
-#ifdef CONFIG_X86_DMA_REMAP /* Platform code defines bridge-specific code */
|
|
|
-extern bool dma_capable(struct device *dev, dma_addr_t addr, size_t size);
|
|
|
-extern dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr);
|
|
|
-extern phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
|
|
|
-#else
|
|
|
-
|
|
|
-static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
|
|
|
-{
|
|
|
- if (!dev->dma_mask)
|
|
|
- return 0;
|
|
|
-
|
|
|
- return addr + size - 1 <= *dev->dma_mask;
|
|
|
-}
|
|
|
-
|
|
|
-static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
|
|
|
-{
|
|
|
- return __sme_set(paddr);
|
|
|
-}
|
|
|
-
|
|
|
-static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
|
|
|
-{
|
|
|
- return __sme_clr(daddr);
|
|
|
-}
|
|
|
-#endif /* CONFIG_X86_DMA_REMAP */
|
|
|
-
|
|
|
static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
|
|
|
gfp_t gfp)
|
|
|
{
|