All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE
@ 2018-07-30  7:37 ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2018-07-30  7:37 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, iommu

kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
from PPC64 and NOT_COHERENT_CACHE instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/powerpc/Kconfig                   | 3 ---
 arch/powerpc/platforms/Kconfig.cputype | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9f2b75fe2c2d..f9cae7edd735 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -884,9 +884,6 @@ config ZONE_DMA
 	bool
 	default y
 
-config NEED_DMA_MAP_STATE
-	def_bool (PPC64 || NOT_COHERENT_CACHE)
-
 config GENERIC_ISA_DMA
 	bool
 	depends on ISA_DMA_API
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index e6a1de521319..a2578bf8d560 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -3,6 +3,7 @@ config PPC64
 	bool "64-bit kernel"
 	default n
 	select ZLIB_DEFLATE
+	select NEED_DMA_MAP_STATE
 	help
 	  This option selects whether a 32-bit or a 64-bit kernel
 	  will be built.
@@ -386,6 +387,7 @@ config NOT_COHERENT_CACHE
 	depends on 4xx || PPC_8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON
 	default n if PPC_47x
 	default y
+	select NEED_DMA_MAP_STATE
 
 config CHECK_CACHE_COHERENCY
 	bool
-- 
2.18.0

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

* [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE
@ 2018-07-30  7:37 ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2018-07-30  7:37 UTC (permalink / raw)
  To: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
	paulus-eUNUBHrolfbYtjvyW6yDsg, mpe-Gsx/Oe8HsFggBc27wqDAHg
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
from PPC64 and NOT_COHERENT_CACHE instead.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 arch/powerpc/Kconfig                   | 3 ---
 arch/powerpc/platforms/Kconfig.cputype | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9f2b75fe2c2d..f9cae7edd735 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -884,9 +884,6 @@ config ZONE_DMA
 	bool
 	default y
 
-config NEED_DMA_MAP_STATE
-	def_bool (PPC64 || NOT_COHERENT_CACHE)
-
 config GENERIC_ISA_DMA
 	bool
 	depends on ISA_DMA_API
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index e6a1de521319..a2578bf8d560 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -3,6 +3,7 @@ config PPC64
 	bool "64-bit kernel"
 	default n
 	select ZLIB_DEFLATE
+	select NEED_DMA_MAP_STATE
 	help
 	  This option selects whether a 32-bit or a 64-bit kernel
 	  will be built.
@@ -386,6 +387,7 @@ config NOT_COHERENT_CACHE
 	depends on 4xx || PPC_8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON
 	default n if PPC_47x
 	default y
+	select NEED_DMA_MAP_STATE
 
 config CHECK_CACHE_COHERENCY
 	bool
-- 
2.18.0

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

* Re: [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE
@ 2018-07-31 10:47   ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-07-31 10:47 UTC (permalink / raw)
  To: Christoph Hellwig, benh; +Cc: linuxppc-dev, iommu

Christoph Hellwig <hch@lst.de> writes:

> kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
> from PPC64 and NOT_COHERENT_CACHE instead.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  arch/powerpc/Kconfig                   | 3 ---
>  arch/powerpc/platforms/Kconfig.cputype | 2 ++
>  2 files changed, 2 insertions(+), 3 deletions(-)

Thanks.

I did this instead:

commit 870771ae76010c5e42ee8e0278f5823e46e96e3f (HEAD -> next-test)
Author:     Christoph Hellwig <hch@lst.de>
AuthorDate: Mon Jul 30 09:37:21 2018 +0200
Commit:     Michael Ellerman <mpe@ellerman.id.au>
CommitDate: Tue Jul 31 20:43:57 2018 +1000

    powerpc: Do not redefine NEED_DMA_MAP_STATE
    
    kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
    from CONFIG_PPC using the same condition as an if guard.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    [mpe: Move it under PPC]
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5eb4d969afbf..ee38fce075ee 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -226,6 +226,7 @@ config PPC
        select IRQ_DOMAIN
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_RELA
+       select NEED_DMA_MAP_STATE               if PPC64 || NOT_COHERENT_CACHE
        select NEED_SG_DMA_LENGTH
        select NO_BOOTMEM
        select OF
@@ -885,9 +886,6 @@ config ZONE_DMA
        bool
        default y
 
-config NEED_DMA_MAP_STATE
-       def_bool (PPC64 || NOT_COHERENT_CACHE)
-
 config GENERIC_ISA_DMA
        bool
        depends on ISA_DMA_API


cheers

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

* Re: [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE
@ 2018-07-31 10:47   ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-07-31 10:47 UTC (permalink / raw)
  To: Christoph Hellwig, benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> writes:

> kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
> from PPC64 and NOT_COHERENT_CACHE instead.
>
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> ---
>  arch/powerpc/Kconfig                   | 3 ---
>  arch/powerpc/platforms/Kconfig.cputype | 2 ++
>  2 files changed, 2 insertions(+), 3 deletions(-)

Thanks.

I did this instead:

commit 870771ae76010c5e42ee8e0278f5823e46e96e3f (HEAD -> next-test)
Author:     Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
AuthorDate: Mon Jul 30 09:37:21 2018 +0200
Commit:     Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
CommitDate: Tue Jul 31 20:43:57 2018 +1000

    powerpc: Do not redefine NEED_DMA_MAP_STATE
    
    kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
    from CONFIG_PPC using the same condition as an if guard.
    
    Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
    [mpe: Move it under PPC]
    Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5eb4d969afbf..ee38fce075ee 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -226,6 +226,7 @@ config PPC
        select IRQ_DOMAIN
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_RELA
+       select NEED_DMA_MAP_STATE               if PPC64 || NOT_COHERENT_CACHE
        select NEED_SG_DMA_LENGTH
        select NO_BOOTMEM
        select OF
@@ -885,9 +886,6 @@ config ZONE_DMA
        bool
        default y
 
-config NEED_DMA_MAP_STATE
-       def_bool (PPC64 || NOT_COHERENT_CACHE)
-
 config GENERIC_ISA_DMA
        bool
        depends on ISA_DMA_API


cheers

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

* Re: powerpc: do not redefined NEED_DMA_MAP_STATE
  2018-07-30  7:37 ` Christoph Hellwig
  (?)
  (?)
@ 2018-08-03 10:48 ` Michael Ellerman
  -1 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-08-03 10:48 UTC (permalink / raw)
  To: Christoph Hellwig, benh, paulus; +Cc: iommu, linuxppc-dev

On Mon, 2018-07-30 at 07:37:21 UTC, Christoph Hellwig wrote:
> kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it
> from PPC64 and NOT_COHERENT_CACHE instead.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/06832fc004815b4b43628d21fc8171

cheers

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

end of thread, other threads:[~2018-08-03 10:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  7:37 [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE Christoph Hellwig
2018-07-30  7:37 ` Christoph Hellwig
2018-07-31 10:47 ` Michael Ellerman
2018-07-31 10:47   ` Michael Ellerman
2018-08-03 10:48 ` Michael Ellerman

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.