fsnotify: Fix busy inodes during unmount
[sfrench/cifs-2.6.git] / arch / mips / loongson64 / common / dma.c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/dma-direct.h>
3
4 dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
5 {
6         return paddr | 0x80000000;
7 }
8
9 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr)
10 {
11 #if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT)
12         if (dma_addr > 0x8fffffff)
13                 return dma_addr;
14         return dma_addr & 0x0fffffff;
15 #else
16         return dma_addr & 0x7fffffff;
17 #endif
18 }