sparc: use generic dma_noncoherent_ops
Subsystems (2)
PATCH 1/1 sparc: use generic dma_noncoherent_ops
Switch to the generic noncoherent direct mapping implementation.
This removes the previous sync_single_for_device implementation, which looks bogus given that no syncing is happening in the similar but more important map_single case.
Signed-off-by Christoph Hellwig <[email protected]>
Acked-by Sam Ravnborg <[email protected]>
--- Makefile | 2 +- arch/sparc/Kconfig | 2 + arch/sparc/include/asm/dma-mapping.h | 5 +- arch/sparc/kernel/ioport.c | 193 +++++---------------------- 4 files changed, 36 insertions(+), 166 deletions(-)
Makefile +1 -1
@@ -368,7 +368,7 @@ HOST_LOADLIBES := $(HOST_LFS_LIBS) # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc +CC = sparc64-linux-gnu-gcc-8 CPP = $(CC) -E AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm
arch/sparc/Kconfig +2 -0
@@ -48,6 +48,8 @@ config SPARC config SPARC32 def_bool !64BIT + select ARCH_HAS_SYNC_DMA_FOR_CPU + select DMA_NONCOHERENT_OPS select GENERIC_ATOMIC64 select CLZ_TAB select HAVE_UID16
arch/sparc/include/asm/dma-mapping.h +2 -3
@@ -7,7 +7,6 @@#include <linux/dma-debug.h> extern const struct dma_map_ops *dma_ops; -extern const struct dma_map_ops pci32_dma_ops;extern struct bus_type pci_bus_type;
@@ -15,11 +14,11 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) {#ifdef CONFIG_SPARC_LEON if (sparc_cpu_model == sparc_leon) -return &pci32_dma_ops; +return &dma_noncoherent_ops;#endif #if defined(CONFIG_SPARC32 ) && defined(CONFIG_PCI )if (bus == &pci_bus_type) -return &pci32_dma_ops; +return &dma_noncoherent_ops;#endif return dma_ops; }
arch/sparc/kernel/ioport.c +31 -162
263 lines not on this page · raw message
Signature · 1 line
2.18.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Christoph.
Quoted 20 lines · Christoph Hellwig
Switch to the generic noncoherent direct mapping implementation.
This removes the previous
sync_single_for_deviceimplementation, which looks bogus given that no syncing is happening in the similar but more importantmap_singlecase.Signed-off-by Christoph Hellwig <[email protected]>Acked-by Sam Ravnborg <[email protected]>--- Makefile | 2 +- arch/sparc/Kconfig | 2 + arch/sparc/include/asm/dma-mapping.h | 5 +- arch/sparc/kernel/ioport.c | 193 +++++---------------------- 4 files changed, 36 insertions(+), 166 deletions(-)Makefile +0
-0
Makefile HOST_LOADLIBES := $(HOST_LFS_LIBS) · line 374
Quoted 8 lines
Makefile +1
-1@@ -368,7 +368,7 @@ HOST_LOADLIBES := $(HOST_LFS_LIBS) # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc +CC = sparc64-linux-gnu-gcc-8 CPP = $(CC) -E AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm
This sneaked in by accident...
Sam