All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-06-28  9:16 ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, linux, sza, arnd, gregkh, akpm, alexandre.torgue,
	robin.murphy, kbuild-all, benjamin.gaignard, hch, m.szyprowski,
	Steven Miao, Geert Uytterhoeven, Michal Simek, Yoshinori Sato,
	Rich Felker, Chris Zankel, Max Filippov

These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
dma_alloc_coherent() and friends for NOMMU" which has been partly
merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
operations for NOMMU due to aforementioned change.

@Benjamin, your Tested-by for ARM bits would be very appretiated!

@Christoph, in case you decide to queue PATCH 1/2, can you put it
before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
to the new dma operations won't break bisectability.

[1] git://git.infradead.org/users/hch/dma-mapping.git for-next
[2] https://www.spinics.net/lists/arm-kernel/msg590587.html

Cc: Steven Miao <realmz6@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>

Thanks!

Vladimir Murzin (2):
  drivers: dma-mapping: allow dma_common_mmap() for NOMMU
  fixup: ARM: NOMMU: Introduce dma operations for noMMU

 arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
 arch/blackfin/Kconfig           |  1 +
 arch/m32r/Kconfig               |  1 +
 arch/m68k/Kconfig               |  1 +
 arch/microblaze/Kconfig         |  1 +
 arch/sh/Kconfig                 |  1 +
 arch/xtensa/Kconfig             |  1 +
 drivers/base/dma-mapping.c      |  4 ++--
 8 files changed, 8 insertions(+), 20 deletions(-)

-- 
2.0.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-06-28  9:16 ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel

These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
dma_alloc_coherent() and friends for NOMMU" which has been partly
merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
operations for NOMMU due to aforementioned change.

@Benjamin, your Tested-by for ARM bits would be very appretiated!

@Christoph, in case you decide to queue PATCH 1/2, can you put it
before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
to the new dma operations won't break bisectability.

[1] git://git.infradead.org/users/hch/dma-mapping.git for-next
[2] https://www.spinics.net/lists/arm-kernel/msg590587.html

Cc: Steven Miao <realmz6@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>

Thanks!

Vladimir Murzin (2):
  drivers: dma-mapping: allow dma_common_mmap() for NOMMU
  fixup: ARM: NOMMU: Introduce dma operations for noMMU

 arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
 arch/blackfin/Kconfig           |  1 +
 arch/m32r/Kconfig               |  1 +
 arch/m68k/Kconfig               |  1 +
 arch/microblaze/Kconfig         |  1 +
 arch/sh/Kconfig                 |  1 +
 arch/xtensa/Kconfig             |  1 +
 drivers/base/dma-mapping.c      |  4 ++--
 8 files changed, 8 insertions(+), 20 deletions(-)

-- 
2.0.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2] drivers: dma-mapping: allow dma_common_mmap() for NOMMU
  2017-06-28  9:16 ` Vladimir Murzin
@ 2017-06-28  9:16   ` Vladimir Murzin
  -1 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, linux, sza, arnd, gregkh, akpm, alexandre.torgue,
	robin.murphy, kbuild-all, benjamin.gaignard, hch, m.szyprowski,
	Steven Miao, Geert Uytterhoeven, Michal Simek, Yoshinori Sato,
	Rich Felker, Chris Zankel, Max Filippov

Currently, internals of dma_common_mmap() is compiled out if build is
done for either NOMMU or target which explicitly says it does not
have/want coherent DMA mmap. It turned out that dma_common_mmap() can
be handy in NOMMU setup (at least for ARM).

This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP,
thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays
unchanged.

ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1)
already has mmap callback which can handle (at some extent) NOMMU 2)
already defines dummy pgprot_noncached() for NOMMU build.

c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP.

Cc: Steven Miao <realmz6@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/blackfin/Kconfig      | 1 +
 arch/m32r/Kconfig          | 1 +
 arch/m68k/Kconfig          | 1 +
 arch/microblaze/Kconfig    | 1 +
 arch/sh/Kconfig            | 1 +
 arch/xtensa/Kconfig        | 1 +
 drivers/base/dma-mapping.c | 4 ++--
 7 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 3c1bd64..89bdb82 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -41,6 +41,7 @@ config BLACKFIN
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_NMI
+	select ARCH_NO_COHERENT_DMA_MMAP
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 9547446..87cde1e 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -19,6 +19,7 @@ config M32R
 	select HAVE_DEBUG_STACKOVERFLOW
 	select CPU_NO_EFFICIENT_FFS
 	select DMA_NOOP_OPS
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index d140206..5abb548 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -2,6 +2,7 @@ config M68K
 	bool
 	default y
 	select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select HAVE_IDE
 	select HAVE_AOUT if MMU
 	select HAVE_DEBUG_BUGVERBOSE
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 85885a5..8ba7b7c 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -2,6 +2,7 @@ config MICROBLAZE
 	def_bool y
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_MIGHT_HAVE_PC_PARPORT
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
 	select CLKSRC_OF
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index ee08695..640a859 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -2,6 +2,7 @@ config SUPERH
 	def_bool y
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 	select ARCH_MIGHT_HAVE_PC_PARPORT
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select HAVE_PATA_PLATFORM
 	select CLKDEV_LOOKUP
 	select HAVE_IDE if HAS_IOPORT_MAP
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index f4126cf..7ad6d77 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -3,6 +3,7 @@ config ZONE_DMA
 
 config XTENSA
 	def_bool y
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select ARCH_WANT_FRAME_POINTERS
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index 10e7c02..ce1e02b 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -227,7 +227,7 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
 		    void *cpu_addr, dma_addr_t dma_addr, size_t size)
 {
 	int ret = -ENXIO;
-#if defined(CONFIG_MMU) && !defined(CONFIG_ARCH_NO_COHERENT_DMA_MMAP)
+#ifndef CONFIG_ARCH_NO_COHERENT_DMA_MMAP
 	unsigned long user_count = vma_pages(vma);
 	unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
 	unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr));
@@ -244,7 +244,7 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
 				      user_count << PAGE_SHIFT,
 				      vma->vm_page_prot);
 	}
-#endif	/* CONFIG_MMU && !CONFIG_ARCH_NO_COHERENT_DMA_MMAP */
+#endif	/* !CONFIG_ARCH_NO_COHERENT_DMA_MMAP */
 
 	return ret;
 }
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/2] drivers: dma-mapping: allow dma_common_mmap() for NOMMU
@ 2017-06-28  9:16   ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel

Currently, internals of dma_common_mmap() is compiled out if build is
done for either NOMMU or target which explicitly says it does not
have/want coherent DMA mmap. It turned out that dma_common_mmap() can
be handy in NOMMU setup (at least for ARM).

This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP,
thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays
unchanged.

ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1)
already has mmap callback which can handle (at some extent) NOMMU 2)
already defines dummy pgprot_noncached() for NOMMU build.

c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP.

Cc: Steven Miao <realmz6@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/blackfin/Kconfig      | 1 +
 arch/m32r/Kconfig          | 1 +
 arch/m68k/Kconfig          | 1 +
 arch/microblaze/Kconfig    | 1 +
 arch/sh/Kconfig            | 1 +
 arch/xtensa/Kconfig        | 1 +
 drivers/base/dma-mapping.c | 4 ++--
 7 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 3c1bd64..89bdb82 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -41,6 +41,7 @@ config BLACKFIN
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_NMI
+	select ARCH_NO_COHERENT_DMA_MMAP
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 9547446..87cde1e 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -19,6 +19,7 @@ config M32R
 	select HAVE_DEBUG_STACKOVERFLOW
 	select CPU_NO_EFFICIENT_FFS
 	select DMA_NOOP_OPS
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index d140206..5abb548 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -2,6 +2,7 @@ config M68K
 	bool
 	default y
 	select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select HAVE_IDE
 	select HAVE_AOUT if MMU
 	select HAVE_DEBUG_BUGVERBOSE
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 85885a5..8ba7b7c 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -2,6 +2,7 @@ config MICROBLAZE
 	def_bool y
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_MIGHT_HAVE_PC_PARPORT
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
 	select CLKSRC_OF
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index ee08695..640a859 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -2,6 +2,7 @@ config SUPERH
 	def_bool y
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 	select ARCH_MIGHT_HAVE_PC_PARPORT
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select HAVE_PATA_PLATFORM
 	select CLKDEV_LOOKUP
 	select HAVE_IDE if HAS_IOPORT_MAP
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index f4126cf..7ad6d77 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -3,6 +3,7 @@ config ZONE_DMA
 
 config XTENSA
 	def_bool y
+	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
 	select ARCH_WANT_FRAME_POINTERS
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index 10e7c02..ce1e02b 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -227,7 +227,7 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
 		    void *cpu_addr, dma_addr_t dma_addr, size_t size)
 {
 	int ret = -ENXIO;
-#if defined(CONFIG_MMU) && !defined(CONFIG_ARCH_NO_COHERENT_DMA_MMAP)
+#ifndef CONFIG_ARCH_NO_COHERENT_DMA_MMAP
 	unsigned long user_count = vma_pages(vma);
 	unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
 	unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr));
@@ -244,7 +244,7 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
 				      user_count << PAGE_SHIFT,
 				      vma->vm_page_prot);
 	}
-#endif	/* CONFIG_MMU && !CONFIG_ARCH_NO_COHERENT_DMA_MMAP */
+#endif	/* !CONFIG_ARCH_NO_COHERENT_DMA_MMAP */
 
 	return ret;
 }
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] fixup: ARM: NOMMU: Introduce dma operations for noMMU
  2017-06-28  9:16 ` Vladimir Murzin
@ 2017-06-28  9:16   ` Vladimir Murzin
  -1 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, linux, sza, arnd, gregkh, akpm, alexandre.torgue,
	robin.murphy, kbuild-all, benjamin.gaignard, hch, m.szyprowski

dma_common_mmap() is already available for NOMMU, so there is no point
to carry own version. Moreover, existent implementation relies on
dma-noop provides mmap, but it is not true anymore.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c
index 6adc02f..90ee354 100644
--- a/arch/arm/mm/dma-mapping-nommu.c
+++ b/arch/arm/mm/dma-mapping-nommu.c
@@ -71,23 +71,6 @@ static void arm_nommu_dma_free(struct device *dev, size_t size,
 	return;
 }
 
-static int arm_nommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,
-			      void *cpu_addr, dma_addr_t dma_addr, size_t size,
-			      unsigned long attrs)
-{
-	const struct dma_map_ops *ops = &dma_noop_ops;
-	int ret;
-
-	if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret))
-		return ret;
-
-	if (attrs & DMA_ATTR_NON_CONSISTENT)
-		return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
-
-	WARN_ON_ONCE(1);
-	return -ENXIO;
-}
-
 static void __dma_page_cpu_to_dev(phys_addr_t paddr, size_t size,
 				  enum dma_data_direction dir)
 {
@@ -190,7 +173,6 @@ static void arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist
 const struct dma_map_ops arm_nommu_dma_ops = {
 	.alloc			= arm_nommu_dma_alloc,
 	.free			= arm_nommu_dma_free,
-	.mmap			= arm_nommu_dma_mmap,
 	.map_page		= arm_nommu_dma_map_page,
 	.unmap_page		= arm_nommu_dma_unmap_page,
 	.map_sg			= arm_nommu_dma_map_sg,
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] fixup: ARM: NOMMU: Introduce dma operations for noMMU
@ 2017-06-28  9:16   ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-28  9:16 UTC (permalink / raw)
  To: linux-arm-kernel

dma_common_mmap() is already available for NOMMU, so there is no point
to carry own version. Moreover, existent implementation relies on
dma-noop provides mmap, but it is not true anymore.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c
index 6adc02f..90ee354 100644
--- a/arch/arm/mm/dma-mapping-nommu.c
+++ b/arch/arm/mm/dma-mapping-nommu.c
@@ -71,23 +71,6 @@ static void arm_nommu_dma_free(struct device *dev, size_t size,
 	return;
 }
 
-static int arm_nommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,
-			      void *cpu_addr, dma_addr_t dma_addr, size_t size,
-			      unsigned long attrs)
-{
-	const struct dma_map_ops *ops = &dma_noop_ops;
-	int ret;
-
-	if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret))
-		return ret;
-
-	if (attrs & DMA_ATTR_NON_CONSISTENT)
-		return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
-
-	WARN_ON_ONCE(1);
-	return -ENXIO;
-}
-
 static void __dma_page_cpu_to_dev(phys_addr_t paddr, size_t size,
 				  enum dma_data_direction dir)
 {
@@ -190,7 +173,6 @@ static void arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist
 const struct dma_map_ops arm_nommu_dma_ops = {
 	.alloc			= arm_nommu_dma_alloc,
 	.free			= arm_nommu_dma_free,
-	.mmap			= arm_nommu_dma_mmap,
 	.map_page		= arm_nommu_dma_map_page,
 	.unmap_page		= arm_nommu_dma_unmap_page,
 	.map_sg			= arm_nommu_dma_map_sg,
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
  2017-06-28  9:16 ` Vladimir Murzin
@ 2017-06-28 13:52   ` Christoph Hellwig
  -1 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2017-06-28 13:52 UTC (permalink / raw)
  To: Vladimir Murzin
  Cc: linux-arm-kernel, linux-kernel, linux, sza, arnd, gregkh, akpm,
	alexandre.torgue, robin.murphy, kbuild-all, benjamin.gaignard,
	hch, m.szyprowski, Steven Miao, Geert Uytterhoeven, Michal Simek,
	Yoshinori Sato, Rich Felker, Chris Zankel, Max Filippov

Thanks Vlad,

these look fine to me.  I'll wait another day or two for comments
(especially if other nommu archs actually want this code), and
if nothing shows up will apply them.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-06-28 13:52   ` Christoph Hellwig
  0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2017-06-28 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

Thanks Vlad,

these look fine to me.  I'll wait another day or two for comments
(especially if other nommu archs actually want this code), and
if nothing shows up will apply them.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
  2017-06-28  9:16 ` Vladimir Murzin
@ 2017-06-30 11:36   ` Benjamin Gaignard
  -1 siblings, 0 replies; 16+ messages in thread
From: Benjamin Gaignard @ 2017-06-30 11:36 UTC (permalink / raw)
  To: Vladimir Murzin
  Cc: linux-arm-kernel, Linux Kernel Mailing List,
	Russell King - ARM Linux, Szemző András, Arnd Bergmann,
	Greg Kroah-Hartman, Andrew Morton, Alexandre Torgue,
	robin.murphy, kbuild-all, Christoph Hellwig, Marek Szyprowski,
	Steven Miao, Geert Uytterhoeven, Michal Simek, Yoshinori Sato,
	Rich Felker, Chris Zankel, Max Filippov

2017-06-28 11:16 GMT+02:00 Vladimir Murzin <vladimir.murzin@arm.com>:
> These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
> dma_alloc_coherent() and friends for NOMMU" which has been partly
> merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
> eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
> operations for NOMMU due to aforementioned change.
>
> @Benjamin, your Tested-by for ARM bits would be very appretiated!

I have been able to test on stm32f4 with drm/kms drivers which is
calling dma_alloc_coherent
and modetest doing mmap and it is working fine.

tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

>
> @Christoph, in case you decide to queue PATCH 1/2, can you put it
> before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
> to the new dma operations won't break bisectability.
>
> [1] git://git.infradead.org/users/hch/dma-mapping.git for-next
> [2] https://www.spinics.net/lists/arm-kernel/msg590587.html
>
> Cc: Steven Miao <realmz6@gmail.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Chris Zankel <chris@zankel.net>
> Cc: Max Filippov <jcmvbkbc@gmail.com>
>
> Thanks!
>
> Vladimir Murzin (2):
>   drivers: dma-mapping: allow dma_common_mmap() for NOMMU
>   fixup: ARM: NOMMU: Introduce dma operations for noMMU
>
>  arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
>  arch/blackfin/Kconfig           |  1 +
>  arch/m32r/Kconfig               |  1 +
>  arch/m68k/Kconfig               |  1 +
>  arch/microblaze/Kconfig         |  1 +
>  arch/sh/Kconfig                 |  1 +
>  arch/xtensa/Kconfig             |  1 +
>  drivers/base/dma-mapping.c      |  4 ++--
>  8 files changed, 8 insertions(+), 20 deletions(-)
>
> --
> 2.0.0
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-06-30 11:36   ` Benjamin Gaignard
  0 siblings, 0 replies; 16+ messages in thread
From: Benjamin Gaignard @ 2017-06-30 11:36 UTC (permalink / raw)
  To: linux-arm-kernel

2017-06-28 11:16 GMT+02:00 Vladimir Murzin <vladimir.murzin@arm.com>:
> These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
> dma_alloc_coherent() and friends for NOMMU" which has been partly
> merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
> eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
> operations for NOMMU due to aforementioned change.
>
> @Benjamin, your Tested-by for ARM bits would be very appretiated!

I have been able to test on stm32f4 with drm/kms drivers which is
calling dma_alloc_coherent
and modetest doing mmap and it is working fine.

tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

>
> @Christoph, in case you decide to queue PATCH 1/2, can you put it
> before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
> to the new dma operations won't break bisectability.
>
> [1] git://git.infradead.org/users/hch/dma-mapping.git for-next
> [2] https://www.spinics.net/lists/arm-kernel/msg590587.html
>
> Cc: Steven Miao <realmz6@gmail.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Chris Zankel <chris@zankel.net>
> Cc: Max Filippov <jcmvbkbc@gmail.com>
>
> Thanks!
>
> Vladimir Murzin (2):
>   drivers: dma-mapping: allow dma_common_mmap() for NOMMU
>   fixup: ARM: NOMMU: Introduce dma operations for noMMU
>
>  arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
>  arch/blackfin/Kconfig           |  1 +
>  arch/m32r/Kconfig               |  1 +
>  arch/m68k/Kconfig               |  1 +
>  arch/microblaze/Kconfig         |  1 +
>  arch/sh/Kconfig                 |  1 +
>  arch/xtensa/Kconfig             |  1 +
>  drivers/base/dma-mapping.c      |  4 ++--
>  8 files changed, 8 insertions(+), 20 deletions(-)
>
> --
> 2.0.0
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org ? Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
  2017-06-30 11:36   ` Benjamin Gaignard
@ 2017-06-30 11:59     ` Vladimir Murzin
  -1 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-30 11:59 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: linux-arm-kernel, Linux Kernel Mailing List,
	Russell King - ARM Linux, Szemző András, Arnd Bergmann,
	Greg Kroah-Hartman, Andrew Morton, Alexandre Torgue,
	robin.murphy, kbuild-all, Christoph Hellwig, Marek Szyprowski,
	Steven Miao, Geert Uytterhoeven, Michal Simek, Yoshinori Sato,
	Rich Felker, Chris Zankel, Max Filippov

On 30/06/17 12:36, Benjamin Gaignard wrote:
> 2017-06-28 11:16 GMT+02:00 Vladimir Murzin <vladimir.murzin@arm.com>:
>> These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
>> dma_alloc_coherent() and friends for NOMMU" which has been partly
>> merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
>> eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
>> operations for NOMMU due to aforementioned change.
>>
>> @Benjamin, your Tested-by for ARM bits would be very appretiated!
> 
> I have been able to test on stm32f4 with drm/kms drivers which is
> calling dma_alloc_coherent
> and modetest doing mmap and it is working fine.
> 
> tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> 

Great thanks!

Vladimir

>>
>> @Christoph, in case you decide to queue PATCH 1/2, can you put it
>> before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
>> to the new dma operations won't break bisectability.
>>
>> [1] git://git.infradead.org/users/hch/dma-mapping.git for-next
>> [2] https://www.spinics.net/lists/arm-kernel/msg590587.html
>>
>> Cc: Steven Miao <realmz6@gmail.com>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Michal Simek <monstr@monstr.eu>
>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
>> Cc: Rich Felker <dalias@libc.org>
>> Cc: Chris Zankel <chris@zankel.net>
>> Cc: Max Filippov <jcmvbkbc@gmail.com>
>>
>> Thanks!
>>
>> Vladimir Murzin (2):
>>   drivers: dma-mapping: allow dma_common_mmap() for NOMMU
>>   fixup: ARM: NOMMU: Introduce dma operations for noMMU
>>
>>  arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
>>  arch/blackfin/Kconfig           |  1 +
>>  arch/m32r/Kconfig               |  1 +
>>  arch/m68k/Kconfig               |  1 +
>>  arch/microblaze/Kconfig         |  1 +
>>  arch/sh/Kconfig                 |  1 +
>>  arch/xtensa/Kconfig             |  1 +
>>  drivers/base/dma-mapping.c      |  4 ++--
>>  8 files changed, 8 insertions(+), 20 deletions(-)
>>
>> --
>> 2.0.0
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-06-30 11:59     ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-06-30 11:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 30/06/17 12:36, Benjamin Gaignard wrote:
> 2017-06-28 11:16 GMT+02:00 Vladimir Murzin <vladimir.murzin@arm.com>:
>> These two patches are folloups on "[PATCH v6 0/7] ARM: Fix
>> dma_alloc_coherent() and friends for NOMMU" which has been partly
>> merged in [1]. PATCH 1/2 is done per Christoph's suggestion [2] to
>> eliminate duplication in dma-noop.c.  PATCH 2/2 is fixup for ARM's dma
>> operations for NOMMU due to aforementioned change.
>>
>> @Benjamin, your Tested-by for ARM bits would be very appretiated!
> 
> I have been able to test on stm32f4 with drm/kms drivers which is
> calling dma_alloc_coherent
> and modetest doing mmap and it is working fine.
> 
> tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> 

Great thanks!

Vladimir

>>
>> @Christoph, in case you decide to queue PATCH 1/2, can you put it
>> before "ARM: NOMMU: Introduce dma operations for noMMU", so transition
>> to the new dma operations won't break bisectability.
>>
>> [1] git://git.infradead.org/users/hch/dma-mapping.git for-next
>> [2] https://www.spinics.net/lists/arm-kernel/msg590587.html
>>
>> Cc: Steven Miao <realmz6@gmail.com>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Michal Simek <monstr@monstr.eu>
>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
>> Cc: Rich Felker <dalias@libc.org>
>> Cc: Chris Zankel <chris@zankel.net>
>> Cc: Max Filippov <jcmvbkbc@gmail.com>
>>
>> Thanks!
>>
>> Vladimir Murzin (2):
>>   drivers: dma-mapping: allow dma_common_mmap() for NOMMU
>>   fixup: ARM: NOMMU: Introduce dma operations for noMMU
>>
>>  arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
>>  arch/blackfin/Kconfig           |  1 +
>>  arch/m32r/Kconfig               |  1 +
>>  arch/m68k/Kconfig               |  1 +
>>  arch/microblaze/Kconfig         |  1 +
>>  arch/sh/Kconfig                 |  1 +
>>  arch/xtensa/Kconfig             |  1 +
>>  drivers/base/dma-mapping.c      |  4 ++--
>>  8 files changed, 8 insertions(+), 20 deletions(-)
>>
>> --
>> 2.0.0
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
  2017-06-28 13:52   ` Christoph Hellwig
@ 2017-07-03  8:49     ` Vladimir Murzin
  -1 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-07-03  8:49 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-arm-kernel, linux-kernel, linux, sza, arnd, gregkh, akpm,
	alexandre.torgue, robin.murphy, kbuild-all, benjamin.gaignard,
	m.szyprowski, Steven Miao, Geert Uytterhoeven, Michal Simek,
	Yoshinori Sato, Rich Felker, Chris Zankel, Max Filippov

On 28/06/17 14:52, Christoph Hellwig wrote:
> Thanks Vlad,
> 
> these look fine to me.  I'll wait another day or two for comments
> (especially if other nommu archs actually want this code), and
> if nothing shows up will apply them.
> 

Gentle remainder to make sure this follow-up is not lost ;)

Cheers
Vladimir

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-07-03  8:49     ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-07-03  8:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 28/06/17 14:52, Christoph Hellwig wrote:
> Thanks Vlad,
> 
> these look fine to me.  I'll wait another day or two for comments
> (especially if other nommu archs actually want this code), and
> if nothing shows up will apply them.
> 

Gentle remainder to make sure this follow-up is not lost ;)

Cheers
Vladimir

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
  2017-07-03  8:49     ` Vladimir Murzin
@ 2017-07-03  8:54       ` Vladimir Murzin
  -1 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-07-03  8:54 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Chris Zankel, Michal Simek, Rich Felker, sza, arnd, Steven Miao,
	gregkh, linux-kernel, linux, Max Filippov, Yoshinori Sato,
	Geert Uytterhoeven, kbuild-all, benjamin.gaignard, akpm,
	m.szyprowski, robin.murphy, linux-arm-kernel, alexandre.torgue

On 03/07/17 09:49, Vladimir Murzin wrote:
> On 28/06/17 14:52, Christoph Hellwig wrote:
>> Thanks Vlad,
>>
>> these look fine to me.  I'll wait another day or two for comments
>> (especially if other nommu archs actually want this code), and
>> if nothing shows up will apply them.
>>
> 
> Gentle remainder to make sure this follow-up is not lost ;)

I should have checked the dma-mapping repo first. I see it was applied two
days ago..

Thanks a lot!.. and sorry for the noise!

Vladimir

> 
> Cheers
> Vladimir
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU"
@ 2017-07-03  8:54       ` Vladimir Murzin
  0 siblings, 0 replies; 16+ messages in thread
From: Vladimir Murzin @ 2017-07-03  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/07/17 09:49, Vladimir Murzin wrote:
> On 28/06/17 14:52, Christoph Hellwig wrote:
>> Thanks Vlad,
>>
>> these look fine to me.  I'll wait another day or two for comments
>> (especially if other nommu archs actually want this code), and
>> if nothing shows up will apply them.
>>
> 
> Gentle remainder to make sure this follow-up is not lost ;)

I should have checked the dma-mapping repo first. I see it was applied two
days ago..

Thanks a lot!.. and sorry for the noise!

Vladimir

> 
> Cheers
> Vladimir
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-07-03  8:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28  9:16 [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU" Vladimir Murzin
2017-06-28  9:16 ` Vladimir Murzin
2017-06-28  9:16 ` [PATCH 1/2] drivers: dma-mapping: allow dma_common_mmap() for NOMMU Vladimir Murzin
2017-06-28  9:16   ` Vladimir Murzin
2017-06-28  9:16 ` [PATCH 2/2] fixup: ARM: NOMMU: Introduce dma operations for noMMU Vladimir Murzin
2017-06-28  9:16   ` Vladimir Murzin
2017-06-28 13:52 ` [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU" Christoph Hellwig
2017-06-28 13:52   ` Christoph Hellwig
2017-07-03  8:49   ` Vladimir Murzin
2017-07-03  8:49     ` Vladimir Murzin
2017-07-03  8:54     ` Vladimir Murzin
2017-07-03  8:54       ` Vladimir Murzin
2017-06-30 11:36 ` Benjamin Gaignard
2017-06-30 11:36   ` Benjamin Gaignard
2017-06-30 11:59   ` Vladimir Murzin
2017-06-30 11:59     ` Vladimir Murzin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.