hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/arch/sparc/include/asm/dma-mapping.h
....@@ -2,25 +2,12 @@
22 #ifndef ___ASM_SPARC_DMA_MAPPING_H
33 #define ___ASM_SPARC_DMA_MAPPING_H
44
5
-#include <linux/scatterlist.h>
6
-#include <linux/mm.h>
7
-#include <linux/dma-debug.h>
8
-
95 extern const struct dma_map_ops *dma_ops;
10
-
11
-extern struct bus_type pci_bus_type;
126
137 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
148 {
15
-#ifdef CONFIG_SPARC_LEON
16
- if (sparc_cpu_model == sparc_leon)
17
- return &dma_noncoherent_ops;
18
-#endif
19
-#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
20
- if (bus == &pci_bus_type)
21
- return &dma_noncoherent_ops;
22
-#endif
23
- return dma_ops;
9
+ /* sparc32 uses per-device dma_ops */
10
+ return IS_ENABLED(CONFIG_SPARC64) ? dma_ops : NULL;
2411 }
2512
2613 #endif