Re: [PATCHv1 2/2] soc: rockchip: power-domain: add rk3588 mem module support

From: kernel test robot
Date: Fri Mar 31 2023 - 18:38:17 EST


Hi Sebastian,

I love your patch! Yet something to improve:

[auto build test ERROR on rockchip/for-next]
[also build test ERROR on linus/master v6.3-rc4 next-20230331]
[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/Sebastian-Reichel/clk-rockchip-rk3588-make-gate-linked-clocks-ignore-unused/20230401-003605
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
patch link: https://lore.kernel.org/r/20230331163058.5688-3-sebastian.reichel%40collabora.com
patch subject: [PATCHv1 2/2] soc: rockchip: power-domain: add rk3588 mem module support
config: riscv-randconfig-r042-20230329 (https://download.01.org/0day-ci/archive/20230401/202304010627.ugL7o7Ct-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/8a9b7bc14bff10030ef40e0350429490ff984f26
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sebastian-Reichel/clk-rockchip-rk3588-make-gate-linked-clocks-ignore-unused/20230401-003605
git checkout 8a9b7bc14bff10030ef40e0350429490ff984f26
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/rockchip/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304010627.ugL7o7Ct-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/soc/rockchip/pm_domains.c:462:2: error: call to undeclared function 'dsb'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
dsb(sy);
^
>> drivers/soc/rockchip/pm_domains.c:462:6: error: use of undeclared identifier 'sy'
dsb(sy);
^
drivers/soc/rockchip/pm_domains.c:475:6: error: use of undeclared identifier 'sy'
dsb(sy);
^
3 errors generated.


vim +/dsb +462 drivers/soc/rockchip/pm_domains.c

441
442 static int rockchip_pmu_domain_mem_reset(struct rockchip_pm_domain *pd)
443 {
444 struct rockchip_pmu *pmu = pd->pmu;
445 struct generic_pm_domain *genpd = &pd->genpd;
446 bool is_on;
447 int ret = 0;
448
449 ret = readx_poll_timeout_atomic(rockchip_pmu_domain_is_chain_on, pd, is_on,
450 is_on == true, 0, 10000);
451 if (ret) {
452 dev_err(pmu->dev,
453 "failed to get chain status '%s', target_on=1, val=%d\n",
454 genpd->name, is_on);
455 goto error;
456 }
457
458 udelay(20);
459
460 regmap_write(pmu->regmap, pmu->info->mem_pwr_offset + pd->info->pwr_offset,
461 (pd->info->pwr_mask | pd->info->pwr_w_mask));
> 462 dsb(sy);
463
464 ret = readx_poll_timeout_atomic(rockchip_pmu_domain_is_mem_on, pd, is_on,
465 is_on == false, 0, 10000);
466 if (ret) {
467 dev_err(pmu->dev,
468 "failed to get mem status '%s', target_on=0, val=%d\n",
469 genpd->name, is_on);
470 goto error;
471 }
472
473 regmap_write(pmu->regmap, pmu->info->mem_pwr_offset + pd->info->pwr_offset,
474 pd->info->pwr_w_mask);
475 dsb(sy);
476
477 ret = readx_poll_timeout_atomic(rockchip_pmu_domain_is_mem_on, pd, is_on,
478 is_on == true, 0, 10000);
479 if (ret) {
480 dev_err(pmu->dev,
481 "failed to get mem status '%s', target_on=1, val=%d\n",
482 genpd->name, is_on);
483 }
484
485 error:
486 return ret;
487 }
488

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests