dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM
@ 2021-05-22  2:13 Randy Dunlap
  2021-05-22  2:13 ` [PATCH 1/4] DMA: ALTERA_MSGDMA depends " Randy Dunlap
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-05-22  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	Laurent Pinchart

A few drivers in drivers/dma/ use iomap(), ioremap(), devm_ioremap(),
etc. Building these drivers when CONFIG_HAS_IOMEM is not set results
in build errors, so make these drivers depend on HAS_IOMEM.

Cc: Stefan Roese <sr@denx.de>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: Sinan Kaya <okaya@codeaurora.org>
Cc: Green Wan <green.wan@sifive.com>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Tejas Upadhyay <tejasu@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[PATCH 1/4] DMA: ALTERA_MSGDMA depends on HAS_IOMEM
[PATCH 2/4] DMA: QCOM_HIDMA_MGMT depends on HAS_IOMEM
[PATCH 3/4] DMA: SF_PDMA depends on HAS_IOMEM
[PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM

 Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

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

* [PATCH 1/4] DMA: ALTERA_MSGDMA depends on HAS_IOMEM
  2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
@ 2021-05-22  2:13 ` Randy Dunlap
  2021-05-22  7:21   ` Stefan Roese
  2021-05-22  2:13 ` [PATCH 2/4] DMA: QCOM_HIDMA_MGMT " Randy Dunlap
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2021-05-22  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	Laurent Pinchart, kernel test robot

When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
functions [including ioremap(), devm_ioremap(), etc.] are not
available.
Drivers that use these functions should depend on HAS_IOMEM so that
they do not cause build errors.

Repairs this build error:
s390-linux-ld: drivers/dma/altera-msgdma.o: in function `request_and_map':
altera-msgdma.c:(.text+0x14b0): undefined reference to `devm_ioremap'

Fixes: a85c6f1b2921 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
---
 drivers/dma/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210521.orig/drivers/dma/Kconfig
+++ linux-next-20210521/drivers/dma/Kconfig
@@ -59,6 +59,7 @@ config DMA_OF
 #devices
 config ALTERA_MSGDMA
 	tristate "Altera / Intel mSGDMA Engine"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	help
 	  Enable support for Altera / Intel mSGDMA controller.

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

* [PATCH 2/4] DMA: QCOM_HIDMA_MGMT depends on HAS_IOMEM
  2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
  2021-05-22  2:13 ` [PATCH 1/4] DMA: ALTERA_MSGDMA depends " Randy Dunlap
@ 2021-05-22  2:13 ` Randy Dunlap
  2021-05-22  2:13 ` [PATCH 3/4] DMA: SF_PDMA " Randy Dunlap
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-05-22  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	Laurent Pinchart, kernel test robot

When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
functions [including ioremap(), devm_ioremap(), etc.] are not
available.
Drivers that use these functions should depend on HAS_IOMEM so that
they do not cause build errors.

Rectifies these build errors:
s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_probe':
hidma_mgmt.c:(.text+0x780): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_init':
hidma_mgmt.c:(.init.text+0x126): undefined reference to `of_address_to_resource'
s390-linux-ld: hidma_mgmt.c:(.init.text+0x16e): undefined reference to `of_address_to_resource'

Fixes: 67a2003e0607 ("dmaengine: add Qualcomm Technologies HIDMA channel driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Sinan Kaya <okaya@codeaurora.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
---
 drivers/dma/qcom/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210521.orig/drivers/dma/qcom/Kconfig
+++ linux-next-20210521/drivers/dma/qcom/Kconfig
@@ -33,6 +33,7 @@ config QCOM_GPI_DMA
 
 config QCOM_HIDMA_MGMT
 	tristate "Qualcomm Technologies HIDMA Management support"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	help
 	  Enable support for the Qualcomm Technologies HIDMA Management.

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

* [PATCH 3/4] DMA: SF_PDMA depends on HAS_IOMEM
  2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
  2021-05-22  2:13 ` [PATCH 1/4] DMA: ALTERA_MSGDMA depends " Randy Dunlap
  2021-05-22  2:13 ` [PATCH 2/4] DMA: QCOM_HIDMA_MGMT " Randy Dunlap
@ 2021-05-22  2:13 ` Randy Dunlap
  2021-05-22  2:13 ` [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA " Randy Dunlap
  2021-05-31  4:14 ` [PATCH 0/4] DMA: several drivers depend " Vinod Koul
  4 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-05-22  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	Laurent Pinchart, kernel test robot

When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
functions [including ioremap(), devm_ioremap(), etc.] are not
available.
Drivers that use these functions should depend on HAS_IOMEM so that
they do not cause build errors.

Mends this build error:
s390-linux-ld: drivers/dma/sf-pdma/sf-pdma.o: in function `sf_pdma_probe':
sf-pdma.c:(.text+0x1668): undefined reference to `devm_ioremap_resource'

Fixes: 6973886ad58e ("dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Green Wan <green.wan@sifive.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
---
 drivers/dma/sf-pdma/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210521.orig/drivers/dma/sf-pdma/Kconfig
+++ linux-next-20210521/drivers/dma/sf-pdma/Kconfig
@@ -1,5 +1,6 @@
 config SF_PDMA
 	tristate "Sifive PDMA controller driver"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help

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

* [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
                   ` (2 preceding siblings ...)
  2021-05-22  2:13 ` [PATCH 3/4] DMA: SF_PDMA " Randy Dunlap
@ 2021-05-22  2:13 ` Randy Dunlap
  2021-05-23  0:20   ` Laurent Pinchart
  2021-05-31  4:14 ` [PATCH 0/4] DMA: several drivers depend " Vinod Koul
  4 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2021-05-22  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	Laurent Pinchart, kernel test robot

When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
functions [including ioremap(), devm_ioremap(), etc.] are not
available.
Drivers that use these functions should depend on HAS_IOMEM so that
they do not cause build errors.

Cures this build error:
s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'

Fixes: 7cbb0c63de3fc ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
CC: dmaengine@vger.kernel.org
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Tejas Upadhyay <tejasu@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/dma/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210521.orig/drivers/dma/Kconfig
+++ linux-next-20210521/drivers/dma/Kconfig
@@ -702,6 +702,7 @@ config XILINX_ZYNQMP_DMA
 
 config XILINX_ZYNQMP_DPDMA
 	tristate "Xilinx DPDMA Engine"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help

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

* Re: [PATCH 1/4] DMA: ALTERA_MSGDMA depends on HAS_IOMEM
  2021-05-22  2:13 ` [PATCH 1/4] DMA: ALTERA_MSGDMA depends " Randy Dunlap
@ 2021-05-22  7:21   ` Stefan Roese
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Roese @ 2021-05-22  7:21 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Vinod Koul, dmaengine, Sinan Kaya, Green Wan, Hyun Kwon,
	Tejas Upadhyay, Michal Simek, Laurent Pinchart,
	kernel test robot

On 22.05.21 04:13, Randy Dunlap wrote:
> When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
> functions [including ioremap(), devm_ioremap(), etc.] are not
> available.
> Drivers that use these functions should depend on HAS_IOMEM so that
> they do not cause build errors.
> 
> Repairs this build error:
> s390-linux-ld: drivers/dma/altera-msgdma.o: in function `request_and_map':
> altera-msgdma.c:(.text+0x14b0): undefined reference to `devm_ioremap'
> 
> Fixes: a85c6f1b2921 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: dmaengine@vger.kernel.org

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   drivers/dma/Kconfig |    1 +
>   1 file changed, 1 insertion(+)
> 
> --- linux-next-20210521.orig/drivers/dma/Kconfig
> +++ linux-next-20210521/drivers/dma/Kconfig
> @@ -59,6 +59,7 @@ config DMA_OF
>   #devices
>   config ALTERA_MSGDMA
>   	tristate "Altera / Intel mSGDMA Engine"
> +	depends on HAS_IOMEM
>   	select DMA_ENGINE
>   	help
>   	  Enable support for Altera / Intel mSGDMA controller.
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

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

* Re: [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-22  2:13 ` [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA " Randy Dunlap
@ 2021-05-23  0:20   ` Laurent Pinchart
  2021-05-23  1:07     ` Randy Dunlap
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2021-05-23  0:20 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	kernel test robot

Hi Randy,

Thank you for the patch.

On Fri, May 21, 2021 at 07:13:13PM -0700, Randy Dunlap wrote:
> When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
> functions [including ioremap(), devm_ioremap(), etc.] are not
> available.
> Drivers that use these functions should depend on HAS_IOMEM so that
> they do not cause build errors.
> 
> Cures this build error:
> s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
> xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'

I've previously posted
https://lore.kernel.org/dmaengine/20210520152420.23986-2-laurent.pinchart@ideasonboard.com/T/#u
which fixes the same issue (plus an additional one).

> Fixes: 7cbb0c63de3fc ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> CC: dmaengine@vger.kernel.org
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Tejas Upadhyay <tejasu@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/dma/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-next-20210521.orig/drivers/dma/Kconfig
> +++ linux-next-20210521/drivers/dma/Kconfig
> @@ -702,6 +702,7 @@ config XILINX_ZYNQMP_DMA
>  
>  config XILINX_ZYNQMP_DPDMA
>  	tristate "Xilinx DPDMA Engine"
> +	depends on HAS_IOMEM
>  	select DMA_ENGINE
>  	select DMA_VIRTUAL_CHANNELS
>  	help

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-23  0:20   ` Laurent Pinchart
@ 2021-05-23  1:07     ` Randy Dunlap
  2021-05-23 18:53       ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2021-05-23  1:07 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-kernel, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	kernel test robot

On 5/22/21 5:20 PM, Laurent Pinchart wrote:
> Hi Randy,
> 
> Thank you for the patch.
> 
> On Fri, May 21, 2021 at 07:13:13PM -0700, Randy Dunlap wrote:
>> When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
>> functions [including ioremap(), devm_ioremap(), etc.] are not
>> available.
>> Drivers that use these functions should depend on HAS_IOMEM so that
>> they do not cause build errors.
>>
>> Cures this build error:
>> s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
>> xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'
> 
> I've previously posted
> https://lore.kernel.org/dmaengine/20210520152420.23986-2-laurent.pinchart@ideasonboard.com/T/#u
> which fixes the same issue (plus an additional one).

Hi Laurent,

I didn't add a dependency on OF because OF header files _mostly_
have stubs so that they work when  OF is enabled or disabled.

I did find a problem in <linux/of_address.h> where it could end up
without having a stub. I will post a patch for that soon.
I'm currently doing lots of randconfig builds on it.

Thanks.

>> Fixes: 7cbb0c63de3fc ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: Vinod Koul <vkoul@kernel.org>
>> CC: dmaengine@vger.kernel.org
>> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
>> Cc: Tejas Upadhyay <tejasu@xilinx.com>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>>  drivers/dma/Kconfig |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> --- linux-next-20210521.orig/drivers/dma/Kconfig
>> +++ linux-next-20210521/drivers/dma/Kconfig
>> @@ -702,6 +702,7 @@ config XILINX_ZYNQMP_DMA
>>  
>>  config XILINX_ZYNQMP_DPDMA
>>  	tristate "Xilinx DPDMA Engine"
>> +	depends on HAS_IOMEM
>>  	select DMA_ENGINE
>>  	select DMA_VIRTUAL_CHANNELS
>>  	help
> 


-- 
~Randy


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

* Re: [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-23  1:07     ` Randy Dunlap
@ 2021-05-23 18:53       ` Laurent Pinchart
  2021-05-23 19:08         ` Randy Dunlap
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2021-05-23 18:53 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	kernel test robot

Hi Randy,

On Sat, May 22, 2021 at 06:07:01PM -0700, Randy Dunlap wrote:
> On 5/22/21 5:20 PM, Laurent Pinchart wrote:
> > On Fri, May 21, 2021 at 07:13:13PM -0700, Randy Dunlap wrote:
> >> When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
> >> functions [including ioremap(), devm_ioremap(), etc.] are not
> >> available.
> >> Drivers that use these functions should depend on HAS_IOMEM so that
> >> they do not cause build errors.
> >>
> >> Cures this build error:
> >> s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
> >> xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'
> > 
> > I've previously posted
> > https://lore.kernel.org/dmaengine/20210520152420.23986-2-laurent.pinchart@ideasonboard.com/T/#u
> > which fixes the same issue (plus an additional one).
> 
> Hi Laurent,
> 
> I didn't add a dependency on OF because OF header files _mostly_
> have stubs so that they work when  OF is enabled or disabled.
> 
> I did find a problem in <linux/of_address.h> where it could end up
> without having a stub. I will post a patch for that soon.
> I'm currently doing lots of randconfig builds on it.

I'm fine with eithe approach, but the patch you've posted to address the
of_address.h issue has an issue itself.

If Vinod would prefer merging this patch instead of mine,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> >> Fixes: 7cbb0c63de3fc ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Cc: Vinod Koul <vkoul@kernel.org>
> >> CC: dmaengine@vger.kernel.org
> >> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> >> Cc: Tejas Upadhyay <tejasu@xilinx.com>
> >> Cc: Michal Simek <michal.simek@xilinx.com>
> >> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >> ---
> >>  drivers/dma/Kconfig |    1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> --- linux-next-20210521.orig/drivers/dma/Kconfig
> >> +++ linux-next-20210521/drivers/dma/Kconfig
> >> @@ -702,6 +702,7 @@ config XILINX_ZYNQMP_DMA
> >>  
> >>  config XILINX_ZYNQMP_DPDMA
> >>  	tristate "Xilinx DPDMA Engine"
> >> +	depends on HAS_IOMEM
> >>  	select DMA_ENGINE
> >>  	select DMA_VIRTUAL_CHANNELS
> >>  	help

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-23 18:53       ` Laurent Pinchart
@ 2021-05-23 19:08         ` Randy Dunlap
  2021-05-31  4:12           ` Vinod Koul
  0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2021-05-23 19:08 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-kernel, Stefan Roese, Vinod Koul, dmaengine, Sinan Kaya,
	Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	kernel test robot

On 5/23/21 11:53 AM, Laurent Pinchart wrote:
> Hi Randy,
> 
> On Sat, May 22, 2021 at 06:07:01PM -0700, Randy Dunlap wrote:
>> On 5/22/21 5:20 PM, Laurent Pinchart wrote:
>>> On Fri, May 21, 2021 at 07:13:13PM -0700, Randy Dunlap wrote:
>>>> When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
>>>> functions [including ioremap(), devm_ioremap(), etc.] are not
>>>> available.
>>>> Drivers that use these functions should depend on HAS_IOMEM so that
>>>> they do not cause build errors.
>>>>
>>>> Cures this build error:
>>>> s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
>>>> xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'
>>>
>>> I've previously posted
>>> https://lore.kernel.org/dmaengine/20210520152420.23986-2-laurent.pinchart@ideasonboard.com/T/#u
>>> which fixes the same issue (plus an additional one).
>>
>> Hi Laurent,
>>
>> I didn't add a dependency on OF because OF header files _mostly_
>> have stubs so that they work when  OF is enabled or disabled.
>>
>> I did find a problem in <linux/of_address.h> where it could end up
>> without having a stub. I will post a patch for that soon.
>> I'm currently doing lots of randconfig builds on it.
> 
> I'm fine with eithe approach, but the patch you've posted to address the
> of_address.h issue has an issue itself.

I'm also fine with either patch.
I'm reworking the of_address.h patch now.

Thanks.

> If Vinod would prefer merging this patch instead of mine,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>>>> Fixes: 7cbb0c63de3fc ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>> Cc: Vinod Koul <vkoul@kernel.org>
>>>> CC: dmaengine@vger.kernel.org
>>>> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
>>>> Cc: Tejas Upadhyay <tejasu@xilinx.com>
>>>> Cc: Michal Simek <michal.simek@xilinx.com>
>>>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>> ---
>>>>  drivers/dma/Kconfig |    1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> --- linux-next-20210521.orig/drivers/dma/Kconfig
>>>> +++ linux-next-20210521/drivers/dma/Kconfig
>>>> @@ -702,6 +702,7 @@ config XILINX_ZYNQMP_DMA
>>>>  
>>>>  config XILINX_ZYNQMP_DPDMA
>>>>  	tristate "Xilinx DPDMA Engine"
>>>> +	depends on HAS_IOMEM
>>>>  	select DMA_ENGINE
>>>>  	select DMA_VIRTUAL_CHANNELS
>>>>  	help
> 


-- 
~Randy


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

* Re: [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA depends on HAS_IOMEM
  2021-05-23 19:08         ` Randy Dunlap
@ 2021-05-31  4:12           ` Vinod Koul
  0 siblings, 0 replies; 12+ messages in thread
From: Vinod Koul @ 2021-05-31  4:12 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Laurent Pinchart, linux-kernel, Stefan Roese, dmaengine,
	Sinan Kaya, Green Wan, Hyun Kwon, Tejas Upadhyay, Michal Simek,
	kernel test robot

On 23-05-21, 12:08, Randy Dunlap wrote:
> On 5/23/21 11:53 AM, Laurent Pinchart wrote:
> > Hi Randy,
> > 
> > On Sat, May 22, 2021 at 06:07:01PM -0700, Randy Dunlap wrote:
> >> On 5/22/21 5:20 PM, Laurent Pinchart wrote:
> >>> On Fri, May 21, 2021 at 07:13:13PM -0700, Randy Dunlap wrote:
> >>>> When CONFIG_HAS_IOMEM is not set/enabled, most iomap() family
> >>>> functions [including ioremap(), devm_ioremap(), etc.] are not
> >>>> available.
> >>>> Drivers that use these functions should depend on HAS_IOMEM so that
> >>>> they do not cause build errors.
> >>>>
> >>>> Cures this build error:
> >>>> s390-linux-ld: drivers/dma/xilinx/xilinx_dpdma.o: in function `xilinx_dpdma_probe':
> >>>> xilinx_dpdma.c:(.text+0x336a): undefined reference to `devm_platform_ioremap_resource'
> >>>
> >>> I've previously posted
> >>> https://lore.kernel.org/dmaengine/20210520152420.23986-2-laurent.pinchart@ideasonboard.com/T/#u
> >>> which fixes the same issue (plus an additional one).
> >>
> >> Hi Laurent,
> >>
> >> I didn't add a dependency on OF because OF header files _mostly_
> >> have stubs so that they work when  OF is enabled or disabled.
> >>
> >> I did find a problem in <linux/of_address.h> where it could end up
> >> without having a stub. I will post a patch for that soon.
> >> I'm currently doing lots of randconfig builds on it.
> > 
> > I'm fine with eithe approach, but the patch you've posted to address the
> > of_address.h issue has an issue itself.
> 
> I'm also fine with either patch.
> I'm reworking the of_address.h patch now.

Back from vacation and clearing inbox... I have already applied Laurents
patch for this... 

Thanks

-- 
~Vinod

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

* Re: [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM
  2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
                   ` (3 preceding siblings ...)
  2021-05-22  2:13 ` [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA " Randy Dunlap
@ 2021-05-31  4:14 ` Vinod Koul
  4 siblings, 0 replies; 12+ messages in thread
From: Vinod Koul @ 2021-05-31  4:14 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Stefan Roese, dmaengine, Sinan Kaya, Green Wan,
	Hyun Kwon, Tejas Upadhyay, Michal Simek, Laurent Pinchart

On 21-05-21, 19:13, Randy Dunlap wrote:
> A few drivers in drivers/dma/ use iomap(), ioremap(), devm_ioremap(),
> etc. Building these drivers when CONFIG_HAS_IOMEM is not set results
> in build errors, so make these drivers depend on HAS_IOMEM.

Applied 1-3, thanks

Also susbsystem tag is "dmanengine:" I have fixed that up while applying

-- 
~Vinod

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

end of thread, other threads:[~2021-05-31  4:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22  2:13 [PATCH 0/4] DMA: several drivers depend on HAS_IOMEM Randy Dunlap
2021-05-22  2:13 ` [PATCH 1/4] DMA: ALTERA_MSGDMA depends " Randy Dunlap
2021-05-22  7:21   ` Stefan Roese
2021-05-22  2:13 ` [PATCH 2/4] DMA: QCOM_HIDMA_MGMT " Randy Dunlap
2021-05-22  2:13 ` [PATCH 3/4] DMA: SF_PDMA " Randy Dunlap
2021-05-22  2:13 ` [PATCH 4/4] DMA: XILINX_ZYNQMP_DPDMA " Randy Dunlap
2021-05-23  0:20   ` Laurent Pinchart
2021-05-23  1:07     ` Randy Dunlap
2021-05-23 18:53       ` Laurent Pinchart
2021-05-23 19:08         ` Randy Dunlap
2021-05-31  4:12           ` Vinod Koul
2021-05-31  4:14 ` [PATCH 0/4] DMA: several drivers depend " Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).