dmaengine: fsl-edma: fix Makefile logic
Subsystems (3)
PATCH 1/1 dmaengine: fsl-edma: fix Makefile logic
From: Arnd Bergmann <[email protected]>
A change to remove some unnecessary exports ended up removing some necessary ones as well, and caused a build regression by trying to link a single source file into two separate modules:
scripts/Makefile.build:243: drivers/dma/Makefile: fsl-edma-common.o is added to multiple modules: fsl-edma mcf-edma
While the two drivers cannot be used on the same CPU architecture, building both is still possible for compile testing.
--- drivers/dma/Makefile | 8 ++++---- drivers/dma/fsl-edma-common.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-)
drivers/dma/Makefile +4 -4
@@ -31,10 +31,10 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/ obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_DW_EDMA) += dw-edma/ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o -obj-$(CONFIG_FSL_DMA) += fsldma.o -fsl-edma-objs := fsl-edma-main.o fsl-edma-common.o -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o -mcf-edma-objs := mcf-edma-main.o fsl-edma-common.o +obj-$(CONFIG_FSL_DMA) += fsldma.o fsl-edma-common.o +fsl-edma-objs := fsl-edma-main.o +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o +mcf-edma-objs := mcf-edma-main.o obj-$(CONFIG_MCF_EDMA) += mcf-edma.o obj-$(CONFIG_FSL_QDMA) += fsl-qdma.o obj-$(CONFIG_FSL_RAID) += fsl_raid.o
drivers/dma/fsl-edma-common.c +17 -0
@@ -67,6 +67,7 @@ void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan)spin_unlock (&fsl_chan->vchan.lock); } +EXPORT_SYMBOL_GPL (fsl_edma_tx_chan_handler);static void fsl_edma3_enable_request (struct fsl_edma_chan *fsl_chan) {
@@ -159,6 +160,7 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan)iowrite8 (EDMA_CEEI_CEEI (ch), regs->ceei); } } +EXPORT_SYMBOL_GPL (fsl_edma_disable_request);static void mux_configure8 (struct fsl_edma_chan *fsl_chan,void __iomem *addr,u32 off,u32 slot,bool enable)
@@ -212,6 +214,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,else mux_configure8 (fsl_chan, muxaddr, ch_off, slot, enable); } +EXPORT_SYMBOL_GPL (fsl_edma_chan_mux);static unsigned int fsl_edma_get_tcd_attr (enum dma_slave_buswidth addr_width) {
@@ -235,6 +238,7 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc) fsl_desc->tcd[i].ptcd);kfree (fsl_desc); } +EXPORT_SYMBOL_GPL (fsl_edma_free_desc);int fsl_edma_terminate_all (struct dma_chan *chan) {
@@ -255,6 +259,7 @@ int fsl_edma_terminate_all(struct dma_chan *chan)return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_terminate_all);int fsl_edma_pause (struct dma_chan *chan) {
@@ -270,6 +275,7 @@ int fsl_edma_pause(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_pause);int fsl_edma_resume (struct dma_chan *chan) {
@@ -285,6 +291,7 @@ int fsl_edma_resume(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_resume);static void fsl_edma_unprep_slave_dma (struct fsl_edma_chan *fsl_chan) {
@@ -345,6 +352,7 @@ int fsl_edma_slave_config(struct dma_chan *chan,return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_slave_config);static size_t fsl_edma_desc_residue (struct fsl_edma_chan *fsl_chan,struct virt_dma_desc *vdesc,bool in_progress)
@@ -425,6 +433,7 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan,return fsl_chan->status; } +EXPORT_SYMBOL_GPL (fsl_edma_tx_status);static void fsl_edma_set_tcd_regs (struct fsl_edma_chan *fsl_chan,struct fsl_edma_hw_tcd *tcd)
@@ -644,6 +653,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_dma_cyclic); struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl,
@@ -740,6 +750,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_slave_sg); struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, dma_addr_t dma_dst, dma_addr_t dma_src,
@@ -762,6 +773,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan,return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_memcpy);void fsl_edma_xfer_desc (struct fsl_edma_chan *fsl_chan) {
@@ -797,6 +809,7 @@ void fsl_edma_issue_pending(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_issue_pending);int fsl_edma_alloc_chan_resources (struct dma_chan *chan) {
@@ -807,6 +820,7 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) 32, 0);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_alloc_chan_resources);void fsl_edma_free_chan_resources (struct dma_chan *chan) {
@@ -830,6 +844,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->is_sw = false; fsl_chan->srcid =0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_free_chan_resources);void fsl_edma_cleanup_vchan (struct dma_device *dmadev) {
@@ -841,6 +856,7 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev)tasklet_kill (&chan->vchan.task); } } +EXPORT_SYMBOL_GPL (fsl_edma_cleanup_vchan);/* * On the 32 channels Vybrid/mpc577x edma version, register offsets are
@@ -877,5 +893,6 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.inth = edma->membase +EDMA64_INTH ; } } +EXPORT_SYMBOL_GPL (fsl_edma_setup_regs);MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.39.2
Frank Li
maintainerQuoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A change to remove some unnecessary exports ended up removing some necessary ones as well, and caused a build regression by trying to link a single source file into two separate modules:
You should fix Kconfig to provent fsl-edma and mcf-edma build at the same time.
EXPORT_SYMBOL_GPL is not necesary at all.
mcf-edma is quit old. ideally, it should be merged into fsl-edma.
Frank Li
Quoted 174 lines
scripts/Makefile.build:243:drivers/dma/Makefile: fsl-edma-common.o is added to multiple modules: fsl-edma mcf-edmaWhile the two drivers cannot be used on the same CPU architecture, building both is still possible for compile testing.
Fixes 66aac8ea0a6c ("dmaengine: fsl-edma: clean up EXPORT_SYMBOL_GPL in fsl-edma-common.c")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/dma/Makefile | 8 ++++---- drivers/dma/fsl-edma-common.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-)drivers/dma/Makefile +4
-4@@ -31,10 +31,10 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/ obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_DW_EDMA) += dw-edma/ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o -obj-$(CONFIG_FSL_DMA) += fsldma.o -fsl-edma-objs := fsl-edma-main.o fsl-edma-common.o -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o -mcf-edma-objs := mcf-edma-main.o fsl-edma-common.o +obj-$(CONFIG_FSL_DMA) += fsldma.o fsl-edma-common.o +fsl-edma-objs := fsl-edma-main.o +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o +mcf-edma-objs := mcf-edma-main.o obj-$(CONFIG_MCF_EDMA) += mcf-edma.o obj-$(CONFIG_FSL_QDMA) += fsl-qdma.o obj-$(CONFIG_FSL_RAID) += fsl_raid.odrivers/dma/fsl-edma-common.c +17
-0@@ -67,6 +67,7 @@ void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan)spin_unlock (&fsl_chan->vchan.lock); } +EXPORT_SYMBOL_GPL (fsl_edma_tx_chan_handler);static void fsl_edma3_enable_request (struct fsl_edma_chan *fsl_chan) {@@ -159,6 +160,7 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan)iowrite8 (EDMA_CEEI_CEEI (ch), regs->ceei); } } +EXPORT_SYMBOL_GPL (fsl_edma_disable_request);static void mux_configure8 (struct fsl_edma_chan *fsl_chan,void __iomem *addr,u32 off,u32 slot,bool enable)@@ -212,6 +214,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,else mux_configure8 (fsl_chan, muxaddr, ch_off, slot, enable); } +EXPORT_SYMBOL_GPL (fsl_edma_chan_mux);static unsigned int fsl_edma_get_tcd_attr (enum dma_slave_buswidth addr_width) {@@ -235,6 +238,7 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc) fsl_desc->tcd[i].ptcd);kfree (fsl_desc); } +EXPORT_SYMBOL_GPL (fsl_edma_free_desc);int fsl_edma_terminate_all (struct dma_chan *chan) {@@ -255,6 +259,7 @@ int fsl_edma_terminate_all(struct dma_chan *chan)return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_terminate_all);int fsl_edma_pause (struct dma_chan *chan) {@@ -270,6 +275,7 @@ int fsl_edma_pause(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_pause);int fsl_edma_resume (struct dma_chan *chan) {@@ -285,6 +291,7 @@ int fsl_edma_resume(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_resume);static void fsl_edma_unprep_slave_dma (struct fsl_edma_chan *fsl_chan) {@@ -345,6 +352,7 @@ int fsl_edma_slave_config(struct dma_chan *chan,return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_slave_config);static size_t fsl_edma_desc_residue (struct fsl_edma_chan *fsl_chan,struct virt_dma_desc *vdesc,bool in_progress)@@ -425,6 +433,7 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan,return fsl_chan->status; } +EXPORT_SYMBOL_GPL (fsl_edma_tx_status);static void fsl_edma_set_tcd_regs (struct fsl_edma_chan *fsl_chan,struct fsl_edma_hw_tcd *tcd)@@ -644,6 +653,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_dma_cyclic); struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl,@@ -740,6 +750,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_slave_sg); struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, dma_addr_t dma_dst, dma_addr_t dma_src,@@ -762,6 +773,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan,return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_memcpy);void fsl_edma_xfer_desc (struct fsl_edma_chan *fsl_chan) {@@ -797,6 +809,7 @@ void fsl_edma_issue_pending(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_issue_pending);int fsl_edma_alloc_chan_resources (struct dma_chan *chan) {@@ -807,6 +820,7 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) 32, 0);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_alloc_chan_resources);void fsl_edma_free_chan_resources (struct dma_chan *chan) {@@ -830,6 +844,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->is_sw = false; fsl_chan->srcid =0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_free_chan_resources);void fsl_edma_cleanup_vchan (struct dma_device *dmadev) {@@ -841,6 +856,7 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev)tasklet_kill (&chan->vchan.task); } } +EXPORT_SYMBOL_GPL (fsl_edma_cleanup_vchan);/* * On the 32 channels Vybrid/mpc577x edma version, register offsets are @@ -877,5 +893,6 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.inth = edma->membase +EDMA64_INTH ; } } +EXPORT_SYMBOL_GPL (fsl_edma_setup_regs);MODULE_LICENSE ("GPL v2" );Signature · 1 line
2.39.2
Quoted 9 lines · Frank Li
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A change to remove some unnecessary exports ended up removing some necessary ones as well, and caused a build regression by trying to link a single source file into two separate modules:
You should fix
Kconfigto provent fsl-edma and mcf-edma build at the same time.
That sounds like the wrong approach since it prevents compile-testing one of the drivers in an allmodconfig build.
Quoted 3 lines
EXPORT_SYMBOL_GPLis not necesary at all.mcf-edma is quit old. ideally, it should be merged into fsl-edma.
I have no specific interest in either of the drivers, just trying to fix the build regression. I see no harm in exporting the symbols, but I can refactor the drivers to link all three files into the same module and add a hack to register both platform_driver instances from a shared module_init() if you think that's better. Unfortunately we can't have more than one initcall in a loadable module.
Arnd
Frank Li
maintainerQuoted 19 lines · Arnd Bergmann
Quoted 9 lines · Frank Li
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A change to remove some unnecessary exports ended up removing some necessary ones as well, and caused a build regression by trying to link a single source file into two separate modules:
You should fix
Kconfigto provent fsl-edma and mcf-edma build at the same time.That sounds like the wrong approach since it prevents compile-testing one of the drivers in an allmodconfig build.
Quoted 3 lines
EXPORT_SYMBOL_GPLis not necesary at all.mcf-edma is quit old. ideally, it should be merged into fsl-edma.
Quoted 7 lines
I have no specific interest in either of the drivers, just trying to fix the build regression. I see no harm in exporting the symbols, but I can refactor the drivers to link all three files into the same module and add a hack to register both
platform_driverinstances from a sharedmodule_init()if you think that's better. Unfortunately we can't have more than one initcall in a loadable module.
It should be better link into same module because some debugfs and trace improvement are on my TODO list. Export symbols will make more unnessary complex. Or simple exclude MCF_EDMA by change Kconfig
config MCF_EDMA
tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs" depends on !FSL_EDMA
^^^^^
depends on M5441x || COMPILE_TEST
Quoted 2 lines
Arnd
Quoted 6 lines · Frank Li
Quoted 1 line · Arnd Bergmann
On Thu, Jan 11, 2024, at 01:02, Frank Li wrote:
It should be better link into same module because some debugfs and trace improvement are on my TODO list. Export symbols will make more unnessary complex.
Ok, I'll see what I can come up with
Quoted 7 lines
Or simple exclude
MCF_EDMAby changeKconfigconfig
MCF_EDMA
tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs" depends on !FSL_EDMA
^^^^^
depends on M5441x ||COMPILE_TEST
This does not actually prevent building both as modules, it only enforces that you can't have them both enabled if one of them is built-in.
Arnd
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Arnd,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.7 next-20240111]
[cannot apply to vkoul-dmaengine/next]
[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/Arnd-Bergmann/dmaengine-fsl-edma-fix-Makefile-logic/20240111-072410 base: linus/master patch link: https://lore.kernel.org/r/20240110232255.1099757-1-arnd%40kernel.org patch subject: [PATCH] dmaengine: fsl-edma: fix Makefile logic config: m68k-stmark2_defconfig (https://download.01.org/0day-ci/archive/20240112/[email protected]/config) compiler: m68k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
m68k-linux-ld: drivers/dma/mcf-edma-main.o: in function `mcf_edma_probe':
>> mcf-edma-main.c:(.text+0x4de): undefined reference to `fsl_edma_alloc_chan_resources' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x4f8): undefined reference to `fsl_edma_slave_config' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x506): undefined reference to `fsl_edma_prep_slave_sg' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x516): undefined reference to `fsl_edma_pause' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x524): undefined reference to `fsl_edma_terminate_all' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x5d2): undefined reference to `fsl_edma_free_desc' m68k-linux-ld: drivers/dma/mcf-edma-main.o: in function `mcf_edma_remove': >> mcf-edma-main.c:(.text+0xb4): undefined reference to `fsl_edma_cleanup_vchan' m68k-linux-ld: drivers/dma/mcf-edma-main.o: in function `mcf_edma_err_handler': >> mcf-edma-main.c:(.text+0x12e): undefined reference to `fsl_edma_disable_request' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x17a): undefined reference to `fsl_edma_disable_request' m68k-linux-ld: drivers/dma/mcf-edma-main.o: in function `mcf_edma_tx_handler': >> mcf-edma-main.c:(.text+0x20e): undefined reference to `fsl_edma_tx_chan_handler' m68k-linux-ld: drivers/dma/mcf-edma-main.o: in function `mcf_edma_probe': >> mcf-edma-main.c:(.text+0x466): undefined reference to `fsl_edma_setup_regs' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x4d4): undefined reference to `fsl_edma_free_chan_resources' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x4e4): undefined reference to `fsl_edma_prep_dma_cyclic' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x4ee): undefined reference to `fsl_edma_tx_status' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x50c): undefined reference to `fsl_edma_resume' >> m68k-linux-ld: mcf-edma-main.c:(.text+0x52a): undefined reference to `fsl_edma_issue_pending'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Arnd,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.7 next-20240111]
[cannot apply to vkoul-dmaengine/next]
[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/Arnd-Bergmann/dmaengine-fsl-edma-fix-Makefile-logic/20240111-072410 base: linus/master patch link: https://lore.kernel.org/r/20240110232255.1099757-1-arnd%40kernel.org patch subject: [PATCH] dmaengine: fsl-edma: fix Makefile logic config: powerpc-ge_imp3a_defconfig (https://download.01.org/0day-ci/archive/20240112/[email protected]/config) compiler: powerpc-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_prep_dma_cyclic':
>> fsl-edma-common.c:(.text+0x85e): undefined reference to `vchan_tx_submit' >> powerpc-linux-ld: fsl-edma-common.c:(.text+0x866): undefined reference to `vchan_tx_desc_free' >> powerpc-linux-ld: fsl-edma-common.c:(.text+0x86e): undefined reference to `vchan_tx_submit' powerpc-linux-ld: fsl-edma-common.c:(.text+0x876): undefined reference to `vchan_tx_desc_free' powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_prep_memcpy': fsl-edma-common.c:(.text+0xa56): undefined reference to `vchan_tx_submit' powerpc-linux-ld: fsl-edma-common.c:(.text+0xa5a): undefined reference to `vchan_tx_desc_free' powerpc-linux-ld: fsl-edma-common.c:(.text+0xa66): undefined reference to `vchan_tx_submit' powerpc-linux-ld: fsl-edma-common.c:(.text+0xa6a): undefined reference to `vchan_tx_desc_free' powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_prep_slave_sg': fsl-edma-common.c:(.text+0xe32): undefined reference to `vchan_tx_submit' powerpc-linux-ld: fsl-edma-common.c:(.text+0xe36): undefined reference to `vchan_tx_desc_free' powerpc-linux-ld: fsl-edma-common.c:(.text+0xe42): undefined reference to `vchan_tx_submit' powerpc-linux-ld: fsl-edma-common.c:(.text+0xe46): undefined reference to `vchan_tx_desc_free' powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_terminate_all': >> fsl-edma-common.c:(.text+0x13c0): undefined reference to `vchan_dma_desc_free_list' powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_free_chan_resources': fsl-edma-common.c:(.text+0x15d4): undefined reference to `vchan_dma_desc_free_list' powerpc-linux-ld: drivers/dma/fsl-edma-common.o: in function `fsl_edma_tx_status': >> fsl-edma-common.c:(.text+0x1e10): undefined reference to `vchan_find_desc'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Vinod Koul
maintainerHey Arnd,
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A change to remove some unnecessary exports ended up removing some necessary ones as well, and caused a build regression by trying to link a single source file into two separate modules:
scripts/Makefile.build:243:drivers/dma/Makefile: fsl-edma-common.o is added to multiple modules: fsl-edma mcf-edmaWhile the two drivers cannot be used on the same CPU architecture, building both is still possible for compile testing.
Do you have an update for this patch? I noticed kbot complain as well
Quoted 169 lines
Fixes 66aac8ea0a6c ("dmaengine: fsl-edma: clean up EXPORT_SYMBOL_GPL in fsl-edma-common.c")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/dma/Makefile | 8 ++++---- drivers/dma/fsl-edma-common.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-)drivers/dma/Makefile +4
-4@@ -31,10 +31,10 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/ obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_DW_EDMA) += dw-edma/ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o -obj-$(CONFIG_FSL_DMA) += fsldma.o -fsl-edma-objs := fsl-edma-main.o fsl-edma-common.o -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o -mcf-edma-objs := mcf-edma-main.o fsl-edma-common.o +obj-$(CONFIG_FSL_DMA) += fsldma.o fsl-edma-common.o +fsl-edma-objs := fsl-edma-main.o +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o +mcf-edma-objs := mcf-edma-main.o obj-$(CONFIG_MCF_EDMA) += mcf-edma.o obj-$(CONFIG_FSL_QDMA) += fsl-qdma.o obj-$(CONFIG_FSL_RAID) += fsl_raid.odrivers/dma/fsl-edma-common.c +17
-0@@ -67,6 +67,7 @@ void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan)spin_unlock (&fsl_chan->vchan.lock); } +EXPORT_SYMBOL_GPL (fsl_edma_tx_chan_handler);static void fsl_edma3_enable_request (struct fsl_edma_chan *fsl_chan) {@@ -159,6 +160,7 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan)iowrite8 (EDMA_CEEI_CEEI (ch), regs->ceei); } } +EXPORT_SYMBOL_GPL (fsl_edma_disable_request);static void mux_configure8 (struct fsl_edma_chan *fsl_chan,void __iomem *addr,u32 off,u32 slot,bool enable)@@ -212,6 +214,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,else mux_configure8 (fsl_chan, muxaddr, ch_off, slot, enable); } +EXPORT_SYMBOL_GPL (fsl_edma_chan_mux);static unsigned int fsl_edma_get_tcd_attr (enum dma_slave_buswidth addr_width) {@@ -235,6 +238,7 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc) fsl_desc->tcd[i].ptcd);kfree (fsl_desc); } +EXPORT_SYMBOL_GPL (fsl_edma_free_desc);int fsl_edma_terminate_all (struct dma_chan *chan) {@@ -255,6 +259,7 @@ int fsl_edma_terminate_all(struct dma_chan *chan)return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_terminate_all);int fsl_edma_pause (struct dma_chan *chan) {@@ -270,6 +275,7 @@ int fsl_edma_pause(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_pause);int fsl_edma_resume (struct dma_chan *chan) {@@ -285,6 +291,7 @@ int fsl_edma_resume(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_resume);static void fsl_edma_unprep_slave_dma (struct fsl_edma_chan *fsl_chan) {@@ -345,6 +352,7 @@ int fsl_edma_slave_config(struct dma_chan *chan,return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_slave_config);static size_t fsl_edma_desc_residue (struct fsl_edma_chan *fsl_chan,struct virt_dma_desc *vdesc,bool in_progress)@@ -425,6 +433,7 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan,return fsl_chan->status; } +EXPORT_SYMBOL_GPL (fsl_edma_tx_status);static void fsl_edma_set_tcd_regs (struct fsl_edma_chan *fsl_chan,struct fsl_edma_hw_tcd *tcd)@@ -644,6 +653,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_dma_cyclic); struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl,@@ -740,6 +750,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg(return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_slave_sg); struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, dma_addr_t dma_dst, dma_addr_t dma_src,@@ -762,6 +773,7 @@ struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan,return vchan_tx_prep (&fsl_chan->vchan, &fsl_desc->vdesc, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_prep_memcpy);void fsl_edma_xfer_desc (struct fsl_edma_chan *fsl_chan) {@@ -797,6 +809,7 @@ void fsl_edma_issue_pending(struct dma_chan *chan)spin_unlock_irqrestore (&fsl_chan->vchan.lock, flags); } +EXPORT_SYMBOL_GPL (fsl_edma_issue_pending);int fsl_edma_alloc_chan_resources (struct dma_chan *chan) {@@ -807,6 +820,7 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) 32, 0);return 0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_alloc_chan_resources);void fsl_edma_free_chan_resources (struct dma_chan *chan) {@@ -830,6 +844,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->is_sw = false; fsl_chan->srcid =0 ; } +EXPORT_SYMBOL_GPL (fsl_edma_free_chan_resources);void fsl_edma_cleanup_vchan (struct dma_device *dmadev) {@@ -841,6 +856,7 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev)tasklet_kill (&chan->vchan.task); } } +EXPORT_SYMBOL_GPL (fsl_edma_cleanup_vchan);/* * On the 32 channels Vybrid/mpc577x edma version, register offsets are @@ -877,5 +893,6 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.inth = edma->membase +EDMA64_INTH ; } } +EXPORT_SYMBOL_GPL (fsl_edma_setup_regs);MODULE_LICENSE ("GPL v2" );Signature · 1 line
2.39.2
Signature · 1 line
~Vinod