[PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform

Alexander Kochetkov posted 2 patches 6 months ago
[PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by Alexander Kochetkov 6 months ago
This patch is for testing only!

Most of DMA drivers are platform specific and their configuration
options can be enabled only then building kernel for specific
platform. In order to simplify compilation check of such drivers
Kconfig files were modified.

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
 drivers/dma/Kconfig      | 22 +++++++++++-----------
 drivers/dma/amd/Kconfig  |  4 ++--
 drivers/dma/hsu/Kconfig  |  4 ++--
 drivers/dma/qcom/Kconfig |  6 +++---
 drivers/dma/ti/Kconfig   |  2 +-
 drivers/mfd/Kconfig      |  2 +-
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index db87dd2a07f7..b1840ae86964 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -103,7 +103,7 @@ config ARM_DMA350
 
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91 || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -144,7 +144,7 @@ config BCM_SBA_RAID
 
 config DMA_BCM2835
 	tristate "BCM2835 DMA engine support"
-	depends on ARCH_BCM2835
+	depends on ARCH_BCM2835 || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 
@@ -170,7 +170,7 @@ config DMA_SA11X0
 
 config DMA_SUN4I
 	tristate "Allwinner A10 DMA SoCs support"
-	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNIV
+	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNIV || COMPILE_TEST
 	default (MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNIV)
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
@@ -207,7 +207,7 @@ config EP93XX_DMA
 
 config FSL_DMA
 	tristate "Freescale Elo series DMA support"
-	depends on FSL_SOC
+	depends on FSL_SOC || COMPILE_TEST
 	select DMA_ENGINE
 	select ASYNC_TX_ENABLE_CHANNEL_SWITCH
 	help
@@ -219,7 +219,7 @@ config FSL_DMA
 config FSL_EDMA
 	tristate "Freescale eDMA engine support"
 	depends on OF
-	depends on HAS_IOMEM
+	depends on HAS_IOMEM || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -280,7 +280,7 @@ config IMX_DMA
 
 config IMX_SDMA
 	tristate "i.MX SDMA support"
-	depends on ARCH_MXC
+	depends on ARCH_MXC || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -289,7 +289,7 @@ config IMX_SDMA
 
 config INTEL_IDMA64
 	tristate "Intel integrated DMA 64-bit support"
-	depends on HAS_IOMEM
+	depends on HAS_IOMEM || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -420,7 +420,7 @@ config LPC32XX_DMAMUX
 
 config MCF_EDMA
 	tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs"
-	depends on M5441x || (COMPILE_TEST && FSL_EDMA=n)
+	depends on M5441x || (COMPILE_TEST)
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -467,7 +467,7 @@ config MMP_TDMA
 
 config MOXART_DMA
 	tristate "MOXART DMA support"
-	depends on ARCH_MOXART
+	depends on ARCH_MOXART || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -523,7 +523,7 @@ config NBPFAXI_DMA
 
 config OWL_DMA
 	tristate "Actions Semi Owl SoCs DMA support"
-	depends on ARCH_ACTIONS
+	depends on ARCH_ACTIONS || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -582,7 +582,7 @@ config STE_DMA40
 
 config ST_FDMA
 	tristate "ST FDMA dmaengine support"
-	depends on ARCH_STI
+	depends on ARCH_STI || COMPILE_TEST
 	depends on REMOTEPROC
 	select ST_SLIM_REMOTEPROC
 	select DMA_ENGINE
diff --git a/drivers/dma/amd/Kconfig b/drivers/dma/amd/Kconfig
index 00d874872a8f..8773f3c5c31c 100644
--- a/drivers/dma/amd/Kconfig
+++ b/drivers/dma/amd/Kconfig
@@ -2,7 +2,7 @@
 #
 
 config AMD_AE4DMA
-	tristate  "AMD AE4DMA Engine"
+	bool  "AMD AE4DMA Engine"
 	depends on (X86_64 || COMPILE_TEST) && PCI
 	depends on AMD_PTDMA
 	select DMA_ENGINE
@@ -17,7 +17,7 @@ config AMD_AE4DMA
 
 config AMD_PTDMA
 	tristate  "AMD PassThru DMA Engine"
-	depends on X86_64 && PCI
+	depends on (X86_64 || COMPILE_TEST) && PCI
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
diff --git a/drivers/dma/hsu/Kconfig b/drivers/dma/hsu/Kconfig
index af102baec125..80426b74d3a2 100644
--- a/drivers/dma/hsu/Kconfig
+++ b/drivers/dma/hsu/Kconfig
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 # DMA engine configuration for hsu
 config HSU_DMA
-	tristate
+	bool "HSU_DMA"
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 
 config HSU_DMA_PCI
-	tristate
+	bool "HSU_DMA_PCI"
 	depends on HSU_DMA && PCI
diff --git a/drivers/dma/qcom/Kconfig b/drivers/dma/qcom/Kconfig
index ace75d7b835a..224436d3e50a 100644
--- a/drivers/dma/qcom/Kconfig
+++ b/drivers/dma/qcom/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config QCOM_ADM
 	tristate "Qualcomm ADM support"
-	depends on (ARCH_QCOM || COMPILE_TEST) && !PHYS_ADDR_T_64BIT
+	depends on (ARCH_QCOM || COMPILE_TEST)
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -12,7 +12,7 @@ config QCOM_ADM
 
 config QCOM_BAM_DMA
 	tristate "QCOM BAM DMA support"
-	depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM)
+	depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM) || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -21,7 +21,7 @@ config QCOM_BAM_DMA
 
 config QCOM_GPI_DMA
         tristate "Qualcomm Technologies GPI DMA support"
-        depends on ARCH_QCOM
+        depends on ARCH_QCOM || COMPILE_TEST
         select DMA_ENGINE
         select DMA_VIRTUAL_CHANNELS
         help
diff --git a/drivers/dma/ti/Kconfig b/drivers/dma/ti/Kconfig
index 2adc2cca10e9..8bd0b4739326 100644
--- a/drivers/dma/ti/Kconfig
+++ b/drivers/dma/ti/Kconfig
@@ -36,7 +36,7 @@ config DMA_OMAP
 
 config TI_K3_UDMA
 	tristate "Texas Instruments UDMA support"
-	depends on ARCH_K3
+	depends on ARCH_K3 || COMPILE_TEST
 	depends on TI_SCI_PROTOCOL
 	depends on TI_SCI_INTA_IRQCHIP
 	select DMA_ENGINE
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 6fb3768e3d71..866997123a1c 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -702,7 +702,7 @@ config INTEL_SOC_PMIC_MRFLD
 	  that is found on Intel Merrifield systems.
 
 config MFD_INTEL_LPSS
-	tristate
+	bool "MFD_INTEL_LPSS"
 	select COMMON_CLK
 	select MFD_CORE
 
-- 
2.43.0
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by kernel test robot 5 months, 4 weeks ago
Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on shawnguo/for-next sunxi/sunxi/for-next lee-mfd/for-mfd-next linus/master v6.16-rc2 next-20250617]
[cannot apply to atorgue-stm32/stm32-next lee-mfd/for-mfd-fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Kochetkov/dmaengine-virt-dma-convert-tasklet-to-BH-workqueue-for-callback-invocation/20250616-205118
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20250616124934.141782-3-al.kochet%40gmail.com
patch subject: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
config: sh-kismet-CONFIG_COMMON_CLK-CONFIG_MFD_INTEL_LPSS-0-0 (https://download.01.org/0day-ci/archive/20250617/202506172123.A2I5Sxtj-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20250617/202506172123.A2I5Sxtj-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506172123.A2I5Sxtj-lkp@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for COMMON_CLK when selected by MFD_INTEL_LPSS
   WARNING: unmet direct dependencies detected for COMMON_CLK
     Depends on [n]: !HAVE_LEGACY_CLK [=y]
     Selected by [y]:
     - MFD_INTEL_LPSS [=y] && HAS_IOMEM [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by kernel test robot 5 months, 4 weeks ago
Hi Alexander,

kernel test robot noticed the following build errors:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on shawnguo/for-next sunxi/sunxi/for-next lee-mfd/for-mfd-next linus/master v6.16-rc2 next-20250617]
[cannot apply to atorgue-stm32/stm32-next lee-mfd/for-mfd-fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Kochetkov/dmaengine-virt-dma-convert-tasklet-to-BH-workqueue-for-callback-invocation/20250616-205118
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20250616124934.141782-3-al.kochet%40gmail.com
patch subject: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20250617/202506172031.WOhp9AYg-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250617/202506172031.WOhp9AYg-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506172031.WOhp9AYg-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/dma/fsldma.c:37:
   drivers/dma/fsldma.c: In function 'set_sr':
>> drivers/dma/fsldma.h:254:25: error: implicit declaration of function 'fsl_iowrite32be'; did you mean 'iowrite32be'? [-Wimplicit-function-declaration]
     254 |                         fsl_iowrite##width##be(val, addr) : fsl_iowrite \
         |                         ^~~~~~~~~~~
   drivers/dma/fsldma.c:52:9: note: in expansion of macro 'FSL_DMA_OUT'
      52 |         FSL_DMA_OUT(chan, &chan->regs->sr, val, 32);
         |         ^~~~~~~~~~~
>> drivers/dma/fsldma.h:254:61: error: implicit declaration of function 'fsl_iowrite32'; did you mean 'gf_iowrite32'? [-Wimplicit-function-declaration]
     254 |                         fsl_iowrite##width##be(val, addr) : fsl_iowrite \
         |                                                             ^~~~~~~~~~~
   drivers/dma/fsldma.c:52:9: note: in expansion of macro 'FSL_DMA_OUT'
      52 |         FSL_DMA_OUT(chan, &chan->regs->sr, val, 32);
         |         ^~~~~~~~~~~
   drivers/dma/fsldma.c: In function 'get_sr':
>> drivers/dma/fsldma.h:250:25: error: implicit declaration of function 'fsl_ioread32be'; did you mean 'ioread32be'? [-Wimplicit-function-declaration]
     250 |                         fsl_ioread##width##be(addr) : fsl_ioread##width(addr))
         |                         ^~~~~~~~~~
   drivers/dma/fsldma.c:57:16: note: in expansion of macro 'FSL_DMA_IN'
      57 |         return FSL_DMA_IN(chan, &chan->regs->sr, 32);
         |                ^~~~~~~~~~
>> drivers/dma/fsldma.h:250:55: error: implicit declaration of function 'fsl_ioread32'; did you mean 'gf_ioread32'? [-Wimplicit-function-declaration]
     250 |                         fsl_ioread##width##be(addr) : fsl_ioread##width(addr))
         |                                                       ^~~~~~~~~~
   drivers/dma/fsldma.c:57:16: note: in expansion of macro 'FSL_DMA_IN'
      57 |         return FSL_DMA_IN(chan, &chan->regs->sr, 32);
         |                ^~~~~~~~~~
   drivers/dma/fsldma.c: In function 'set_cdar':
>> drivers/dma/fsldma.h:254:25: error: implicit declaration of function 'fsl_iowrite64be' [-Wimplicit-function-declaration]
     254 |                         fsl_iowrite##width##be(val, addr) : fsl_iowrite \
         |                         ^~~~~~~~~~~
   drivers/dma/fsldma.c:72:9: note: in expansion of macro 'FSL_DMA_OUT'
      72 |         FSL_DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64);
         |         ^~~~~~~~~~~
>> drivers/dma/fsldma.h:254:61: error: implicit declaration of function 'fsl_iowrite64' [-Wimplicit-function-declaration]
     254 |                         fsl_iowrite##width##be(val, addr) : fsl_iowrite \
         |                                                             ^~~~~~~~~~~
   drivers/dma/fsldma.c:72:9: note: in expansion of macro 'FSL_DMA_OUT'
      72 |         FSL_DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64);
         |         ^~~~~~~~~~~
   drivers/dma/fsldma.c: In function 'get_cdar':
>> drivers/dma/fsldma.h:250:25: error: implicit declaration of function 'fsl_ioread64be' [-Wimplicit-function-declaration]
     250 |                         fsl_ioread##width##be(addr) : fsl_ioread##width(addr))
         |                         ^~~~~~~~~~
   drivers/dma/fsldma.c:77:16: note: in expansion of macro 'FSL_DMA_IN'
      77 |         return FSL_DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN;
         |                ^~~~~~~~~~
>> drivers/dma/fsldma.h:250:55: error: implicit declaration of function 'fsl_ioread64' [-Wimplicit-function-declaration]
     250 |                         fsl_ioread##width##be(addr) : fsl_ioread##width(addr))
         |                                                       ^~~~~~~~~~
   drivers/dma/fsldma.c:77:16: note: in expansion of macro 'FSL_DMA_IN'
      77 |         return FSL_DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN;
         |                ^~~~~~~~~~
   drivers/dma/fsldma.c: In function 'fsl_chan_set_src_loop_size':
>> drivers/dma/fsldma.c:269:44: error: implicit declaration of function '__ilog2'; did you mean 'ilog2'? [-Wimplicit-function-declaration]
     269 |                 mode |= FSL_DMA_MR_SAHE | (__ilog2(size) << 14);
         |                                            ^~~~~~~
         |                                            ilog2


vim +254 drivers/dma/fsldma.h

a1ff82a9c165ba Peng Ma   2018-10-30  247  
a1ff82a9c165ba Peng Ma   2018-10-30  248  #define FSL_DMA_IN(fsl_dma, addr, width)			\
a1ff82a9c165ba Peng Ma   2018-10-30  249  		(((fsl_dma)->feature & FSL_DMA_BIG_ENDIAN) ?	\
a1ff82a9c165ba Peng Ma   2018-10-30 @250  			fsl_ioread##width##be(addr) : fsl_ioread##width(addr))
a1ff82a9c165ba Peng Ma   2018-10-30  251  
a1ff82a9c165ba Peng Ma   2018-10-30  252  #define FSL_DMA_OUT(fsl_dma, addr, val, width)			\
a1ff82a9c165ba Peng Ma   2018-10-30  253  		(((fsl_dma)->feature & FSL_DMA_BIG_ENDIAN) ?	\
a1ff82a9c165ba Peng Ma   2018-10-30 @254  			fsl_iowrite##width##be(val, addr) : fsl_iowrite	\
a1ff82a9c165ba Peng Ma   2018-10-30  255  		##width(val, addr))
173acc7ce8538f Zhang Wei 2008-03-01  256  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by kernel test robot 5 months, 4 weeks ago
Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on shawnguo/for-next sunxi/sunxi/for-next lee-mfd/for-mfd-next linus/master v6.16-rc2 next-20250617]
[cannot apply to atorgue-stm32/stm32-next lee-mfd/for-mfd-fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Kochetkov/dmaengine-virt-dma-convert-tasklet-to-BH-workqueue-for-callback-invocation/20250616-205118
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20250616124934.141782-3-al.kochet%40gmail.com
patch subject: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
config: arm64-kismet-CONFIG_TI_K3_RINGACC-CONFIG_TI_K3_UDMA-0-0 (https://download.01.org/0day-ci/archive/20250617/202506171823.CHs69U2q-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20250617/202506171823.CHs69U2q-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506171823.CHs69U2q-lkp@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for TI_K3_RINGACC when selected by TI_K3_UDMA
   WARNING: unmet direct dependencies detected for TI_K3_RINGACC
     Depends on [n]: SOC_TI [=n] && (ARCH_K3 [=n] || COMPILE_TEST [=y]) && TI_SCI_INTA_IRQCHIP [=y]
     Selected by [y]:
     - TI_K3_UDMA [=y] && DMADEVICES [=y] && (ARCH_K3 [=n] || COMPILE_TEST [=y]) && TI_SCI_PROTOCOL [=y] && TI_SCI_INTA_IRQCHIP [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by kernel test robot 5 months, 4 weeks ago
Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on shawnguo/for-next sunxi/sunxi/for-next lee-mfd/for-mfd-next linus/master v6.16-rc2 next-20250617]
[cannot apply to atorgue-stm32/stm32-next lee-mfd/for-mfd-fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Kochetkov/dmaengine-virt-dma-convert-tasklet-to-BH-workqueue-for-callback-invocation/20250616-205118
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20250616124934.141782-3-al.kochet%40gmail.com
patch subject: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250617/202506171615.p1kpBZuQ-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250617/202506171615.p1kpBZuQ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506171615.p1kpBZuQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/dma/qcom/qcom_adm.c:245:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
     245 |                 src = &achan->slave.src_addr;
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/qcom/qcom_adm.c:251:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
     251 |                 dst = &achan->slave.dst_addr;
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/qcom/qcom_adm.c:309:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
     309 |                 src = &achan->slave.src_addr;
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/qcom/qcom_adm.c:313:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
     313 |                 dst = &achan->slave.dst_addr;
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/qcom/qcom_adm.c:848:59: warning: implicit conversion from 'unsigned long' to 'unsigned int' changes value from 18446744072371568648 to 2956984328 [-Wconstant-conversion]
     848 |         writel(ADM_CI_RANGE_START(0x40) | ADM_CI_RANGE_END(0xb0) |
         |         ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
     849 |                ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(0));
         |                ~~~~~~~~~~~~~~~~~~~~
   1 warning and 4 errors generated.


vim +848 drivers/dma/qcom/qcom_adm.c

03de6b273805b3 Arnd Bergmann     2021-11-22  745  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  746  static int adm_dma_probe(struct platform_device *pdev)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  747  {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  748  	struct adm_device *adev;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  749  	int ret;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  750  	u32 i;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  751  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  752  	adev = devm_kzalloc(&pdev->dev, sizeof(*adev), GFP_KERNEL);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  753  	if (!adev)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  754  		return -ENOMEM;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  755  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  756  	adev->dev = &pdev->dev;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  757  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  758  	adev->regs = devm_platform_ioremap_resource(pdev, 0);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  759  	if (IS_ERR(adev->regs))
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  760  		return PTR_ERR(adev->regs);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  761  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  762  	adev->irq = platform_get_irq(pdev, 0);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  763  	if (adev->irq < 0)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  764  		return adev->irq;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  765  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  766  	ret = of_property_read_u32(pdev->dev.of_node, "qcom,ee", &adev->ee);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  767  	if (ret) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  768  		dev_err(adev->dev, "Execution environment unspecified\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  769  		return ret;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  770  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  771  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  772  	adev->core_clk = devm_clk_get(adev->dev, "core");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  773  	if (IS_ERR(adev->core_clk))
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  774  		return PTR_ERR(adev->core_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  775  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  776  	adev->iface_clk = devm_clk_get(adev->dev, "iface");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  777  	if (IS_ERR(adev->iface_clk))
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  778  		return PTR_ERR(adev->iface_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  779  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  780  	adev->clk_reset = devm_reset_control_get_exclusive(&pdev->dev, "clk");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  781  	if (IS_ERR(adev->clk_reset)) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  782  		dev_err(adev->dev, "failed to get ADM0 reset\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  783  		return PTR_ERR(adev->clk_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  784  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  785  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  786  	adev->c0_reset = devm_reset_control_get_exclusive(&pdev->dev, "c0");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  787  	if (IS_ERR(adev->c0_reset)) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  788  		dev_err(adev->dev, "failed to get ADM0 C0 reset\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  789  		return PTR_ERR(adev->c0_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  790  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  791  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  792  	adev->c1_reset = devm_reset_control_get_exclusive(&pdev->dev, "c1");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  793  	if (IS_ERR(adev->c1_reset)) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  794  		dev_err(adev->dev, "failed to get ADM0 C1 reset\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  795  		return PTR_ERR(adev->c1_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  796  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  797  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  798  	adev->c2_reset = devm_reset_control_get_exclusive(&pdev->dev, "c2");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  799  	if (IS_ERR(adev->c2_reset)) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  800  		dev_err(adev->dev, "failed to get ADM0 C2 reset\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  801  		return PTR_ERR(adev->c2_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  802  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  803  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  804  	ret = clk_prepare_enable(adev->core_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  805  	if (ret) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  806  		dev_err(adev->dev, "failed to prepare/enable core clock\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  807  		return ret;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  808  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  809  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  810  	ret = clk_prepare_enable(adev->iface_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  811  	if (ret) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  812  		dev_err(adev->dev, "failed to prepare/enable iface clock\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  813  		goto err_disable_core_clk;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  814  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  815  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  816  	reset_control_assert(adev->clk_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  817  	reset_control_assert(adev->c0_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  818  	reset_control_assert(adev->c1_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  819  	reset_control_assert(adev->c2_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  820  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  821  	udelay(2);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  822  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  823  	reset_control_deassert(adev->clk_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  824  	reset_control_deassert(adev->c0_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  825  	reset_control_deassert(adev->c1_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  826  	reset_control_deassert(adev->c2_reset);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  827  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  828  	adev->channels = devm_kcalloc(adev->dev, ADM_MAX_CHANNELS,
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  829  				      sizeof(*adev->channels), GFP_KERNEL);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  830  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  831  	if (!adev->channels) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  832  		ret = -ENOMEM;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  833  		goto err_disable_clks;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  834  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  835  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  836  	/* allocate and initialize channels */
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  837  	INIT_LIST_HEAD(&adev->common.channels);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  838  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  839  	for (i = 0; i < ADM_MAX_CHANNELS; i++)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  840  		adm_channel_init(adev, &adev->channels[i], i);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  841  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  842  	/* reset CRCIs */
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  843  	for (i = 0; i < 16; i++)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  844  		writel(ADM_CRCI_CTL_RST, adev->regs +
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  845  			ADM_CRCI_CTL(i, adev->ee));
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  846  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  847  	/* configure client interfaces */
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14 @848  	writel(ADM_CI_RANGE_START(0x40) | ADM_CI_RANGE_END(0xb0) |
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  849  	       ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(0));
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  850  	writel(ADM_CI_RANGE_START(0x2a) | ADM_CI_RANGE_END(0x2c) |
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  851  	       ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(1));
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  852  	writel(ADM_CI_RANGE_START(0x12) | ADM_CI_RANGE_END(0x28) |
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  853  	       ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(2));
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  854  	writel(ADM_GP_CTL_LP_EN | ADM_GP_CTL_LP_CNT(0xf),
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  855  	       adev->regs + ADM_GP_CTL);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  856  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  857  	ret = devm_request_irq(adev->dev, adev->irq, adm_dma_irq,
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  858  			       0, "adm_dma", adev);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  859  	if (ret)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  860  		goto err_disable_clks;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  861  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  862  	platform_set_drvdata(pdev, adev);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  863  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  864  	adev->common.dev = adev->dev;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  865  	adev->common.dev->dma_parms = &adev->dma_parms;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  866  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  867  	/* set capabilities */
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  868  	dma_cap_zero(adev->common.cap_mask);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  869  	dma_cap_set(DMA_SLAVE, adev->common.cap_mask);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  870  	dma_cap_set(DMA_PRIVATE, adev->common.cap_mask);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  871  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  872  	/* initialize dmaengine apis */
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  873  	adev->common.directions = BIT(DMA_DEV_TO_MEM | DMA_MEM_TO_DEV);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  874  	adev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  875  	adev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  876  	adev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  877  	adev->common.device_free_chan_resources = adm_free_chan;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  878  	adev->common.device_prep_slave_sg = adm_prep_slave_sg;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  879  	adev->common.device_issue_pending = adm_issue_pending;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  880  	adev->common.device_tx_status = adm_tx_status;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  881  	adev->common.device_terminate_all = adm_terminate_all;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  882  	adev->common.device_config = adm_slave_config;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  883  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  884  	ret = dma_async_device_register(&adev->common);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  885  	if (ret) {
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  886  		dev_err(adev->dev, "failed to register dma async device\n");
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  887  		goto err_disable_clks;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  888  	}
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  889  
03de6b273805b3 Arnd Bergmann     2021-11-22  890  	ret = of_dma_controller_register(pdev->dev.of_node, adm_dma_xlate,
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  891  					 &adev->common);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  892  	if (ret)
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  893  		goto err_unregister_dma;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  894  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  895  	return 0;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  896  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  897  err_unregister_dma:
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  898  	dma_async_device_unregister(&adev->common);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  899  err_disable_clks:
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  900  	clk_disable_unprepare(adev->iface_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  901  err_disable_core_clk:
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  902  	clk_disable_unprepare(adev->core_clk);
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  903  
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  904  	return ret;
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  905  }
5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  906  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by Alexander Kochetkov 5 months, 4 weeks ago
One more question. I can translate all other dma drivers to BH
workqueue. I cannot test all of them, but I did this for sun6i and it
works as usual. Fix straightforward. Is it a good idea?

That happened because of this change and this driver doesn't compile on x64.
Any action from me? Should I send v3 without this change?

diff --git a/drivers/dma/qcom/Kconfig b/drivers/dma/qcom/Kconfig
index ace75d7b835a..224436d3e50a 100644
--- a/drivers/dma/qcom/Kconfig
+++ b/drivers/dma/qcom/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config QCOM_ADM
        tristate "Qualcomm ADM support"
-       depends on (ARCH_QCOM || COMPILE_TEST) && !PHYS_ADDR_T_64BIT
+       depends on (ARCH_QCOM || COMPILE_TEST)
        select DMA_ENGINE
        select DMA_VIRTUAL_CHANNELS
        help

вт, 17 июн. 2025 г. в 12:31, kernel test robot <lkp@intel.com>:

>
> Hi Alexander,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on vkoul-dmaengine/next]
> [also build test WARNING on shawnguo/for-next sunxi/sunxi/for-next lee-mfd/for-mfd-next linus/master v6.16-rc2 next-20250617]
> [cannot apply to atorgue-stm32/stm32-next lee-mfd/for-mfd-fixes]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Kochetkov/dmaengine-virt-dma-convert-tasklet-to-BH-workqueue-for-callback-invocation/20250616-205118
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
> patch link:    https://lore.kernel.org/r/20250616124934.141782-3-al.kochet%40gmail.com
> patch subject: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250617/202506171615.p1kpBZuQ-lkp@intel.com/config)
> compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250617/202506171615.p1kpBZuQ-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202506171615.p1kpBZuQ-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>    drivers/dma/qcom/qcom_adm.c:245:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
>      245 |                 src = &achan->slave.src_addr;
>          |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
>    drivers/dma/qcom/qcom_adm.c:251:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
>      251 |                 dst = &achan->slave.dst_addr;
>          |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
>    drivers/dma/qcom/qcom_adm.c:309:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
>      309 |                 src = &achan->slave.src_addr;
>          |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
>    drivers/dma/qcom/qcom_adm.c:313:7: error: incompatible pointer types assigning to 'u32 *' (aka 'unsigned int *') from 'phys_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
>      313 |                 dst = &achan->slave.dst_addr;
>          |                     ^ ~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/dma/qcom/qcom_adm.c:848:59: warning: implicit conversion from 'unsigned long' to 'unsigned int' changes value from 18446744072371568648 to 2956984328 [-Wconstant-conversion]
>      848 |         writel(ADM_CI_RANGE_START(0x40) | ADM_CI_RANGE_END(0xb0) |
>          |         ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
>      849 |                ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(0));
>          |                ~~~~~~~~~~~~~~~~~~~~
>    1 warning and 4 errors generated.
>
>
> vim +848 drivers/dma/qcom/qcom_adm.c
>
> 03de6b273805b3 Arnd Bergmann     2021-11-22  745
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  746  static int adm_dma_probe(struct platform_device *pdev)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  747  {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  748        struct adm_device *adev;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  749        int ret;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  750        u32 i;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  751
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  752        adev = devm_kzalloc(&pdev->dev, sizeof(*adev), GFP_KERNEL);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  753        if (!adev)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  754                return -ENOMEM;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  755
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  756        adev->dev = &pdev->dev;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  757
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  758        adev->regs = devm_platform_ioremap_resource(pdev, 0);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  759        if (IS_ERR(adev->regs))
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  760                return PTR_ERR(adev->regs);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  761
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  762        adev->irq = platform_get_irq(pdev, 0);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  763        if (adev->irq < 0)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  764                return adev->irq;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  765
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  766        ret = of_property_read_u32(pdev->dev.of_node, "qcom,ee", &adev->ee);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  767        if (ret) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  768                dev_err(adev->dev, "Execution environment unspecified\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  769                return ret;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  770        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  771
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  772        adev->core_clk = devm_clk_get(adev->dev, "core");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  773        if (IS_ERR(adev->core_clk))
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  774                return PTR_ERR(adev->core_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  775
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  776        adev->iface_clk = devm_clk_get(adev->dev, "iface");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  777        if (IS_ERR(adev->iface_clk))
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  778                return PTR_ERR(adev->iface_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  779
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  780        adev->clk_reset = devm_reset_control_get_exclusive(&pdev->dev, "clk");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  781        if (IS_ERR(adev->clk_reset)) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  782                dev_err(adev->dev, "failed to get ADM0 reset\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  783                return PTR_ERR(adev->clk_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  784        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  785
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  786        adev->c0_reset = devm_reset_control_get_exclusive(&pdev->dev, "c0");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  787        if (IS_ERR(adev->c0_reset)) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  788                dev_err(adev->dev, "failed to get ADM0 C0 reset\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  789                return PTR_ERR(adev->c0_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  790        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  791
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  792        adev->c1_reset = devm_reset_control_get_exclusive(&pdev->dev, "c1");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  793        if (IS_ERR(adev->c1_reset)) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  794                dev_err(adev->dev, "failed to get ADM0 C1 reset\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  795                return PTR_ERR(adev->c1_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  796        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  797
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  798        adev->c2_reset = devm_reset_control_get_exclusive(&pdev->dev, "c2");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  799        if (IS_ERR(adev->c2_reset)) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  800                dev_err(adev->dev, "failed to get ADM0 C2 reset\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  801                return PTR_ERR(adev->c2_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  802        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  803
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  804        ret = clk_prepare_enable(adev->core_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  805        if (ret) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  806                dev_err(adev->dev, "failed to prepare/enable core clock\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  807                return ret;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  808        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  809
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  810        ret = clk_prepare_enable(adev->iface_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  811        if (ret) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  812                dev_err(adev->dev, "failed to prepare/enable iface clock\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  813                goto err_disable_core_clk;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  814        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  815
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  816        reset_control_assert(adev->clk_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  817        reset_control_assert(adev->c0_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  818        reset_control_assert(adev->c1_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  819        reset_control_assert(adev->c2_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  820
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  821        udelay(2);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  822
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  823        reset_control_deassert(adev->clk_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  824        reset_control_deassert(adev->c0_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  825        reset_control_deassert(adev->c1_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  826        reset_control_deassert(adev->c2_reset);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  827
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  828        adev->channels = devm_kcalloc(adev->dev, ADM_MAX_CHANNELS,
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  829                                      sizeof(*adev->channels), GFP_KERNEL);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  830
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  831        if (!adev->channels) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  832                ret = -ENOMEM;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  833                goto err_disable_clks;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  834        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  835
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  836        /* allocate and initialize channels */
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  837        INIT_LIST_HEAD(&adev->common.channels);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  838
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  839        for (i = 0; i < ADM_MAX_CHANNELS; i++)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  840                adm_channel_init(adev, &adev->channels[i], i);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  841
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  842        /* reset CRCIs */
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  843        for (i = 0; i < 16; i++)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  844                writel(ADM_CRCI_CTL_RST, adev->regs +
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  845                        ADM_CRCI_CTL(i, adev->ee));
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  846
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  847        /* configure client interfaces */
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14 @848        writel(ADM_CI_RANGE_START(0x40) | ADM_CI_RANGE_END(0xb0) |
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  849               ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(0));
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  850        writel(ADM_CI_RANGE_START(0x2a) | ADM_CI_RANGE_END(0x2c) |
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  851               ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(1));
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  852        writel(ADM_CI_RANGE_START(0x12) | ADM_CI_RANGE_END(0x28) |
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  853               ADM_CI_BURST_8_WORDS, adev->regs + ADM_CI_CONF(2));
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  854        writel(ADM_GP_CTL_LP_EN | ADM_GP_CTL_LP_CNT(0xf),
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  855               adev->regs + ADM_GP_CTL);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  856
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  857        ret = devm_request_irq(adev->dev, adev->irq, adm_dma_irq,
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  858                               0, "adm_dma", adev);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  859        if (ret)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  860                goto err_disable_clks;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  861
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  862        platform_set_drvdata(pdev, adev);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  863
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  864        adev->common.dev = adev->dev;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  865        adev->common.dev->dma_parms = &adev->dma_parms;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  866
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  867        /* set capabilities */
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  868        dma_cap_zero(adev->common.cap_mask);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  869        dma_cap_set(DMA_SLAVE, adev->common.cap_mask);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  870        dma_cap_set(DMA_PRIVATE, adev->common.cap_mask);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  871
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  872        /* initialize dmaengine apis */
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  873        adev->common.directions = BIT(DMA_DEV_TO_MEM | DMA_MEM_TO_DEV);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  874        adev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  875        adev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  876        adev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  877        adev->common.device_free_chan_resources = adm_free_chan;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  878        adev->common.device_prep_slave_sg = adm_prep_slave_sg;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  879        adev->common.device_issue_pending = adm_issue_pending;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  880        adev->common.device_tx_status = adm_tx_status;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  881        adev->common.device_terminate_all = adm_terminate_all;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  882        adev->common.device_config = adm_slave_config;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  883
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  884        ret = dma_async_device_register(&adev->common);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  885        if (ret) {
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  886                dev_err(adev->dev, "failed to register dma async device\n");
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  887                goto err_disable_clks;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  888        }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  889
> 03de6b273805b3 Arnd Bergmann     2021-11-22  890        ret = of_dma_controller_register(pdev->dev.of_node, adm_dma_xlate,
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  891                                         &adev->common);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  892        if (ret)
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  893                goto err_unregister_dma;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  894
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  895        return 0;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  896
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  897  err_unregister_dma:
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  898        dma_async_device_unregister(&adev->common);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  899  err_disable_clks:
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  900        clk_disable_unprepare(adev->iface_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  901  err_disable_core_clk:
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  902        clk_disable_unprepare(adev->core_clk);
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  903
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  904        return ret;
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  905  }
> 5c9f8c2dbdbe53 Jonathan McDowell 2020-11-14  906
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] !!! TESTING ONLY !!! Allow compile virt-dma users on ARM64 platform
Posted by Andy Shevchenko 5 months, 4 weeks ago
On Tue, Jun 17, 2025 at 1:16 PM Alexander Kochetkov <al.kochet@gmail.com> wrote:
>
> One more question. I can translate all other dma drivers to BH
> workqueue. I cannot test all of them, but I did this for sun6i and it
> works as usual. Fix straightforward. Is it a good idea?
>
> That happened because of this change and this driver doesn't compile on x64.
> Any action from me? Should I send v3 without this change?

I wouldn't do anything. You explained well what's going on beforehand
along with the proper subject. This was expected, so only if the
maintainer asks you to do something. But modern tools, such as `b4`,
allows to pick up the certain patch(es) from the series, hence it can
be done easily without any need of being re-sent.


-- 
With Best Regards,
Andy Shevchenko