Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399025 > unrolled thread

[PATCH] ata: dwc: add DMADEVICES dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2016-05-11 14:50 +0200
Last post2016-05-11 15:20 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ata: dwc: add DMADEVICES dependency Arnd Bergmann <arnd@arndb.de> - 2016-05-11 14:50 +0200
    Re: [PATCH] ata: dwc: add DMADEVICES dependency Måns Rullgård <mans@mansr.com> - 2016-05-11 15:00 +0200
      Re: [PATCH] ata: dwc: add DMADEVICES dependency Måns Rullgård <mans@mansr.com> - 2016-05-11 15:20 +0200
        Re: [PATCH] ata: dwc: add DMADEVICES dependency Arnd Bergmann <arnd@arndb.de> - 2016-05-11 15:40 +0200
      Re: [PATCH] ata: dwc: add DMADEVICES dependency Arnd Bergmann <arnd@arndb.de> - 2016-05-11 15:20 +0200

#1399025 — [PATCH] ata: dwc: add DMADEVICES dependency

FromArnd Bergmann <arnd@arndb.de>
Date2016-05-11 14:50 +0200
Subject[PATCH] ata: dwc: add DMADEVICES dependency
Message-ID<rxBKq-8nL-3@gated-at.bofh.it>
The dwc_460ex SATA driver has become available on non-powerpc architectures
and may cause randconfig build errors when CONFIG_DMADEVICES is not set:

warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES)
ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined!
ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined!

This adds an explcit Kconfig dependency so we can only build
configurations that build without warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel")
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 41b0725e58ad..8f7a4a4d2566 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -322,7 +322,7 @@ config SATA_DWC
 
 config SATA_DWC_OLD_DMA
 	bool "Support old device trees"
-	depends on SATA_DWC
+	depends on SATA_DWC && DMADEVICES
 	select DW_DMAC_CORE
 	default y if 460EX
 	help
-- 
2.7.0

[toc] | [next] | [standalone]


#1399050

FromMåns Rullgård <mans@mansr.com>
Date2016-05-11 15:00 +0200
Message-ID<rxBU7-8tb-25@gated-at.bofh.it>
In reply to#1399025
Arnd Bergmann <arnd@arndb.de> writes:

> The dwc_460ex SATA driver has become available on non-powerpc architectures
> and may cause randconfig build errors when CONFIG_DMADEVICES is not set:
>
> warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES)
> ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined!
> ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined!
>
> This adds an explcit Kconfig dependency so we can only build
> configurations that build without warnings.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel")
> ---
>  drivers/ata/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 41b0725e58ad..8f7a4a4d2566 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -322,7 +322,7 @@ config SATA_DWC
>
>  config SATA_DWC_OLD_DMA
>  	bool "Support old device trees"
> -	depends on SATA_DWC
> +	depends on SATA_DWC && DMADEVICES
>  	select DW_DMAC_CORE
>  	default y if 460EX
>  	help
> -- 

Isn't the proper fix here to have DW_DMAC_CORE select DMADEVICES?

-- 
Måns Rullgård

[toc] | [prev] | [next] | [standalone]


#1399066

FromMåns Rullgård <mans@mansr.com>
Date2016-05-11 15:20 +0200
Message-ID<rxCds-zl-9@gated-at.bofh.it>
In reply to#1399050
Arnd Bergmann <arnd@arndb.de> writes:

> On Wednesday 11 May 2016 13:57:08 Måns Rullgård wrote:
>> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
>> > index 41b0725e58ad..8f7a4a4d2566 100644
>> > --- a/drivers/ata/Kconfig
>> > +++ b/drivers/ata/Kconfig
>> > @@ -322,7 +322,7 @@ config SATA_DWC
>> >
>> >  config SATA_DWC_OLD_DMA
>> >       bool "Support old device trees"
>> > -     depends on SATA_DWC
>> > +     depends on SATA_DWC && DMADEVICES
>> >       select DW_DMAC_CORE
>> >       default y if 460EX
>> >       help
>> > -- 
>> 
>> Isn't the proper fix here to have DW_DMAC_CORE select DMADEVICES?
>
> No, all dmaengine drivers depend on DMADEVICES, so that would
> cause a circular dependency.
>
> The normal behavior for DMA slave drivers is to use the generic
> DMA API and have a dependency on DMADEVICES but not on a particular
> DMA engine implementation. In this case, the driver uses an exported
> interface of the dw_dma driver directly, so we also need to select
> that one, but it doesn't mean we can skip the normal dependency.

OK, but then shouldn't the main SATA_DWC have this dependency since it
uses the DMA API?

-- 
Måns Rullgård

[toc] | [prev] | [next] | [standalone]


#1399080

FromArnd Bergmann <arnd@arndb.de>
Date2016-05-11 15:40 +0200
Message-ID<rxCwP-Kt-13@gated-at.bofh.it>
In reply to#1399066
On Wednesday 11 May 2016 14:19:05 Måns Rullgård wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > On Wednesday 11 May 2016 13:57:08 Måns Rullgård wrote:
> >> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> >> > index 41b0725e58ad..8f7a4a4d2566 100644
> >> > --- a/drivers/ata/Kconfig
> >> > +++ b/drivers/ata/Kconfig
> >> > @@ -322,7 +322,7 @@ config SATA_DWC
> >> >
> >> >  config SATA_DWC_OLD_DMA
> >> >       bool "Support old device trees"
> >> > -     depends on SATA_DWC
> >> > +     depends on SATA_DWC && DMADEVICES
> >> >       select DW_DMAC_CORE
> >> >       default y if 460EX
> >> >       help
> >> > -- 
> >> 
> >> Isn't the proper fix here to have DW_DMAC_CORE select DMADEVICES?
> >
> > No, all dmaengine drivers depend on DMADEVICES, so that would
> > cause a circular dependency.
> >
> > The normal behavior for DMA slave drivers is to use the generic
> > DMA API and have a dependency on DMADEVICES but not on a particular
> > DMA engine implementation. In this case, the driver uses an exported
> > interface of the dw_dma driver directly, so we also need to select
> > that one, but it doesn't mean we can skip the normal dependency.
> 
> OK, but then shouldn't the main SATA_DWC have this dependency since it
> uses the DMA API?
> 

Right, I missed that and thought only the SATA_DWC_OLD_DMA variant
used dmaengine at all. I'll send a new version of my patch then.

Thanks,

	Arnd

[toc] | [prev] | [next] | [standalone]


#1399068

FromArnd Bergmann <arnd@arndb.de>
Date2016-05-11 15:20 +0200
Message-ID<rxCdt-zl-11@gated-at.bofh.it>
In reply to#1399050
On Wednesday 11 May 2016 13:57:08 Måns Rullgård wrote:
> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> > index 41b0725e58ad..8f7a4a4d2566 100644
> > --- a/drivers/ata/Kconfig
> > +++ b/drivers/ata/Kconfig
> > @@ -322,7 +322,7 @@ config SATA_DWC
> >
> >  config SATA_DWC_OLD_DMA
> >       bool "Support old device trees"
> > -     depends on SATA_DWC
> > +     depends on SATA_DWC && DMADEVICES
> >       select DW_DMAC_CORE
> >       default y if 460EX
> >       help
> > -- 
> 
> Isn't the proper fix here to have DW_DMAC_CORE select DMADEVICES?

No, all dmaengine drivers depend on DMADEVICES, so that would
cause a circular dependency.

The normal behavior for DMA slave drivers is to use the generic
DMA API and have a dependency on DMADEVICES but not on a particular
DMA engine implementation. In this case, the driver uses an exported
interface of the dw_dma driver directly, so we also need to select
that one, but it doesn't mean we can skip the normal dependency.

	Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web