The trivial direct mapping implementation already does a virtual to
physical translation which isn't strictly a noop, and will soon learn
to do non-direct but linear physical to dma translations through the
device offset and a few small tricks. Rename it to a better fitting
name.
Signed-off-by:
For architectures that just use the generic dma_noop_ops we can provide
a generic version of dma-mapping.h.
Signed-off-by: Christoph Hellwig
---
MAINTAINERS | 1 +
arch/m32r/include/asm/Kbuild | 1 +
arch/m32r/include/asm/dma-mapping.h | 17
To implement the x86 forbid_dac and iommu_sac_force we want an arch hook
so that it can apply the global options across all dma_map_ops
implementations.
Signed-off-by: Christoph Hellwig
---
arch/x86/include/asm/dma-mapping.h | 3 +++
arch/x86/kernel/pci-dma.c | 19
Lift the code from x86 so that we behave consistently. In the future we
should probably warn if any of these is set.
Signed-off-by: Christoph Hellwig
Acked-by: Jesper Nilsson
Acked-by: Geert Uytterhoeven [m68k]
---
These days all devices should have a DMA coherent mask, and most dma_ops
implementations rely on that fact. But just to be sure add an assert to
ring the warning bell if that is not the case.
Signed-off-by: Christoph Hellwig
---
include/linux/dma-mapping.h | 1 +
1 file changed, 1
This is not needed in drivers, so move it to a private header.
Signed-off-by: Christoph Hellwig
---
arch/s390/include/asm/dma-mapping.h | 2 --
arch/s390/include/asm/pci_dma.h | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git
Signed-off-by: Christoph Hellwig
---
arch/microblaze/kernel/dma.c | 28
1 file changed, 28 deletions(-)
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index b45d8f8967af..c91e8cef98dd 100644
--- a/arch/microblaze/kernel/dma.c
Always returning 1 is the same behavior as not supplying a method at all.
Signed-off-by: Christoph Hellwig
---
arch/microblaze/kernel/dma.c | 6 --
arch/parisc/kernel/pci-dma.c | 7 ---
2 files changed, 13 deletions(-)
diff --git a/arch/microblaze/kernel/dma.c
We want to use the dma_direct_ namespace for a generic implementation,
so rename powerpc to the second best choice: dma_nommu_.
Signed-off-by: Christoph Hellwig
---
arch/powerpc/include/asm/dma-mapping.h| 8 ++--
arch/powerpc/kernel/dma-iommu.c | 2 +-
This frees the dma_direct_* namespace for a generic implementation.
Signed-off-by: Christoph Hellwig
---
arch/microblaze/include/asm/dma-mapping.h | 4 +--
arch/microblaze/kernel/dma.c | 48 +++
2 files changed, 26 insertions(+), 26
And unlike the other helpers we don't require a as
this helper is a special case for ia64 only, and this keeps it as
simple as possible.
Signed-off-by: Christoph Hellwig
---
arch/arm/include/asm/dma-mapping.h | 2 --
arch/arm64/include/asm/dma-mapping.h | 4
Signed-off-by: Christoph Hellwig
Acked-by: Richard Kuo
---
arch/hexagon/include/asm/dma-mapping.h | 7 ---
arch/hexagon/kernel/dma.c | 1 +
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/hexagon/include/asm/dma-mapping.h
phys_to_dma, dma_to_phys and dma_capable are helpers published by
architecture code for use of swiotlb and xen-swiotlb only. Drivers are
not supposed to use these directly, but use the DMA API instead.
Move these to a new asm/dma-direct.h helper, included by a
linux/dma-direct.h wrapper that
The generic version now takes dma_pfn_offset into account, so there is no
more need for an architecture override.
Signed-off-by: Christoph Hellwig
---
arch/arm64/include/asm/dma-mapping.h | 9 -
1 file changed, 9 deletions(-)
diff --git
This makes sure the generic version can be used with architectures /
devices that have a DMA offset in the direct mapping.
Signed-off-by: Christoph Hellwig
---
include/linux/dma-mapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Signed-off-by: Christoph Hellwig
---
arch/s390/include/asm/dma-mapping.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/s390/include/asm/dma-mapping.h
b/arch/s390/include/asm/dma-mapping.h
index eaf490f9c5bc..2ec7240c1ada 100644
---
Signed-off-by: Christoph Hellwig
---
arch/riscv/include/asm/dma-mapping.h | 8
1 file changed, 8 deletions(-)
diff --git a/arch/riscv/include/asm/dma-mapping.h
b/arch/riscv/include/asm/dma-mapping.h
index 3eec1000196d..73849e2cc761 100644
---
Signed-off-by: Christoph Hellwig
---
arch/m32r/include/asm/dma-mapping.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/m32r/include/asm/dma-mapping.h
b/arch/m32r/include/asm/dma-mapping.h
index 336ffe60814b..8967fb659691 100644
---
We always use the stub definitions, so remove the unused other code.
Signed-off-by: Christoph Hellwig
Acked-by: Vineet Gupta
---
arch/arc/Kconfig | 3 ---
arch/arc/include/asm/dma-mapping.h | 7 ---
arch/arc/mm/dma.c |
Signed-off-by: Christoph Hellwig
---
arch/powerpc/include/asm/dma-mapping.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/include/asm/dma-mapping.h
b/arch/powerpc/include/asm/dma-mapping.h
index 5a6cbe11db6f..592c7f418aa0 100644
---
Signed-off-by: Christoph Hellwig
---
arch/m32r/include/asm/io.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/m32r/include/asm/io.h b/arch/m32r/include/asm/io.h
index 1b653bb16f9a..a4272d8f0d9c 100644
--- a/arch/m32r/include/asm/io.h
+++ b/arch/m32r/include/asm/io.h
@@
Almost every architecture supports a direct dma mapping implementation,
where no iommu is used and the device dma address is a 1:1 mapping to
the physical address or has a simple linear offset. Currently the
code for this implementation is most duplicated over the architectures,
and the
CONFIG_ALPHA_JENSEN has failed to compile since commit 6aca0503
("alpha/dma: use common noop dma ops"), so mark it as broken.
Signed-off-by: Christoph Hellwig
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index
Signed-off-by: Christoph Hellwig
---
arch/hexagon/include/asm/io.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index 66f5e9a61efc..9e8621d94ee9 100644
--- a/arch/hexagon/include/asm/io.h
+++
101 - 124 of 124 matches
Mail list logo