* drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages'
@ 2025-11-07 3:39 kernel test robot
2025-11-07 10:31 ` AW: " markus.stockhausen
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-11-07 3:39 UTC (permalink / raw)
To: Markus Stockhausen; +Cc: oe-kbuild-all, linux-kernel, Miquel Raynal
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4a0c9b3391999818e2c5b93719699b255be1f682
commit: 3148d0e5b1c5733d69ec51b70c8280e46488750a mtd: nand: realtek-ecc: Add Realtek external ECC engine support
date: 6 weeks ago
config: sh-randconfig-r121-20251107 (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-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/202511071114.8WeW2GZK-lkp@intel.com/
All errors (new ones prefixed by >>):
sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function `rtl_ecc_remove':
>> drivers/mtd/nand/ecc-realtek.c:443:(.text+0x1f8): undefined reference to `dma_free_pages'
sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function `rtl_ecc_probe':
>> drivers/mtd/nand/ecc-realtek.c:434:(.text+0x2e8): undefined reference to `dma_alloc_pages'
sh4-linux-ld: drivers/media/i2c/tc358746.o: in function `tc358746_probe':
drivers/media/i2c/tc358746.c:1585:(.text+0x15cc): undefined reference to `devm_clk_hw_register'
sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x163c): undefined reference to `devm_of_clk_add_hw_provider'
sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x1640): undefined reference to `of_clk_hw_simple_get'
vim +443 drivers/mtd/nand/ecc-realtek.c
389
390 static int rtl_ecc_probe(struct platform_device *pdev)
391 {
392 struct device *dev = &pdev->dev;
393 struct rtl_ecc_engine *rtlc;
394 void __iomem *base;
395 int ret;
396
397 rtlc = devm_kzalloc(dev, sizeof(*rtlc), GFP_KERNEL);
398 if (!rtlc)
399 return -ENOMEM;
400
401 base = devm_platform_ioremap_resource(pdev, 0);
402 if (IS_ERR(base))
403 return PTR_ERR(base);
404
405 ret = devm_mutex_init(dev, &rtlc->lock);
406 if (ret)
407 return ret;
408
409 rtlc->regmap = devm_regmap_init_mmio(dev, base, &rtl_ecc_regmap_config);
410 if (IS_ERR(rtlc->regmap))
411 return PTR_ERR(rtlc->regmap);
412
413 /*
414 * Focus on simplicity and use a preallocated DMA buffer for data exchange with the
415 * engine. For now make it a noncoherent memory model as invalidating/flushing caches
416 * is faster than reading/writing uncached memory on the known architectures.
417 */
418
419 rtlc->buf = dma_alloc_noncoherent(dev, RTL_ECC_DMA_SIZE, &rtlc->buf_dma,
420 DMA_BIDIRECTIONAL, GFP_KERNEL);
421 if (IS_ERR(rtlc->buf))
422 return PTR_ERR(rtlc->buf);
423
424 rtlc->dev = dev;
425 rtlc->engine.dev = dev;
426 rtlc->engine.ops = &rtl_ecc_engine_ops;
427 rtlc->engine.integration = NAND_ECC_ENGINE_INTEGRATION_EXTERNAL;
428
429 nand_ecc_register_on_host_hw_engine(&rtlc->engine);
430
431 platform_set_drvdata(pdev, rtlc);
432
433 return 0;
> 434 }
435
436 static void rtl_ecc_remove(struct platform_device *pdev)
437 {
438 struct rtl_ecc_engine *rtlc = platform_get_drvdata(pdev);
439
440 nand_ecc_unregister_on_host_hw_engine(&rtlc->engine);
441 dma_free_noncoherent(rtlc->dev, RTL_ECC_DMA_SIZE, rtlc->buf, rtlc->buf_dma,
442 DMA_BIDIRECTIONAL);
> 443 }
444
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* AW: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages'
2025-11-07 3:39 drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages' kernel test robot
@ 2025-11-07 10:31 ` markus.stockhausen
2025-11-19 19:27 ` Miquel Raynal
0 siblings, 1 reply; 3+ messages in thread
From: markus.stockhausen @ 2025-11-07 10:31 UTC (permalink / raw)
To: 'Miquel Raynal'
Cc: oe-kbuild-all, linux-kernel, 'kernel test robot'
> Von: kernel test robot <lkp@intel.com>
> Gesendet: Freitag, 7. November 2025 04:39
> An: Markus Stockhausen <markus.stockhausen@gmx.de>
> Cc: oe-kbuild-all@lists.linux.dev; linux-kernel@vger.kernel.org; Miquel
Raynal <miquel.raynal@bootlin.com>
> Betreff: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to
`dma_free_pages'
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
> head: 4a0c9b3391999818e2c5b93719699b255be1f682
> commit: 3148d0e5b1c5733d69ec51b70c8280e46488750a mtd: nand: realtek-ecc:
Add Realtek external ECC engine support
> date: 6 weeks ago
> config: sh-randconfig-r121-20251107
(https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-lkp@
intel.com/config)
> compiler: sh4-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-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/202511071114.8WeW2GZK-lkp@intel.
> | com/
>
> All errors (new ones prefixed by >>):
>
> sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function
`rtl_ecc_remove':
> >> drivers/mtd/nand/ecc-realtek.c:443:(.text+0x1f8): undefined reference
to `dma_free_pages'
> sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function
`rtl_ecc_probe':
> >> drivers/mtd/nand/ecc-realtek.c:434:(.text+0x2e8): undefined reference
to `dma_alloc_pages'
> sh4-linux-ld: drivers/media/i2c/tc358746.o: in function
`tc358746_probe':
> drivers/media/i2c/tc358746.c:1585:(.text+0x15cc): undefined reference
to `devm_clk_hw_register'
> sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x163c):
undefined reference to `devm_of_clk_add_hw_provider'
> sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x1640):
undefined reference to `of_clk_hw_simple_get'
Hi Miquel,
help. What needs to be done here?
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: AW: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages'
2025-11-07 10:31 ` AW: " markus.stockhausen
@ 2025-11-19 19:27 ` Miquel Raynal
0 siblings, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2025-11-19 19:27 UTC (permalink / raw)
To: markus.stockhausen
Cc: oe-kbuild-all, linux-kernel, 'kernel test robot'
Hi Markus,
On 07/11/2025 at 11:31:18 +01, <markus.stockhausen@gmx.de> wrote:
>> Von: kernel test robot <lkp@intel.com>
>> Gesendet: Freitag, 7. November 2025 04:39
>> An: Markus Stockhausen <markus.stockhausen@gmx.de>
>> Cc: oe-kbuild-all@lists.linux.dev; linux-kernel@vger.kernel.org; Miquel
> Raynal <miquel.raynal@bootlin.com>
>> Betreff: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to
> `dma_free_pages'
>>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
>> head: 4a0c9b3391999818e2c5b93719699b255be1f682
>> commit: 3148d0e5b1c5733d69ec51b70c8280e46488750a mtd: nand: realtek-ecc:
> Add Realtek external ECC engine support
>> date: 6 weeks ago
>> config: sh-randconfig-r121-20251107
> (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-lkp@
> intel.com/config)
>> compiler: sh4-linux-gcc (GCC) 15.1.0
>> reproduce (this is a W=1 build):
> (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-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/202511071114.8WeW2GZK-lkp@intel.
>> | com/
>>
>> All errors (new ones prefixed by >>):
>>
>> sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function
> `rtl_ecc_remove':
>> >> drivers/mtd/nand/ecc-realtek.c:443:(.text+0x1f8): undefined reference
> to `dma_free_pages'
>> sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function
> `rtl_ecc_probe':
>> >> drivers/mtd/nand/ecc-realtek.c:434:(.text+0x2e8): undefined reference
> to `dma_alloc_pages'
>> sh4-linux-ld: drivers/media/i2c/tc358746.o: in function
> `tc358746_probe':
>> drivers/media/i2c/tc358746.c:1585:(.text+0x15cc): undefined reference
> to `devm_clk_hw_register'
>> sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x163c):
> undefined reference to `devm_of_clk_add_hw_provider'
>> sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x1640):
> undefined reference to `of_clk_hw_simple_get'
>
> Hi Miquel,
>
> help. What needs to be done here?
>
> Markus
Looks like the sh architecture has no DMA support whereas the driver
depends on it without properly advertising it in Kconfig. The driver may
be enabled on this architecture due to COMPILE_TEST being set in
Kconfig.
I'll send a small fix.
Cheers,
Miquèl
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-19 19:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 3:39 drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages' kernel test robot
2025-11-07 10:31 ` AW: " markus.stockhausen
2025-11-19 19:27 ` Miquel Raynal
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).