2021-12-06 22:47:28

by kernel test robot

[permalink] [raw]
Subject: rockchip_i2s_tdm.c:undefined reference to `clk_set_parent'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f80ef9e49fdfbfbc4197711230098b90e6b05a7e
commit: 081068fd641403994f0505e6b91e021d3925f348 ASoC: rockchip: add support for i2s-tdm controller
date: 9 weeks ago
config: mips-randconfig-r031-20211206 (https://download.01.org/0day-ci/archive/20211207/[email protected]/config)
compiler: mips-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=081068fd641403994f0505e6b91e021d3925f348
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 081068fd641403994f0505e6b91e021d3925f348
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

mips-linux-ld: sound/soc/jz4740/jz4740-i2s.o: in function `jz4740_i2s_set_sysclk':
jz4740-i2s.c:(.text+0x3ec): undefined reference to `clk_set_parent'
mips-linux-ld: jz4740-i2s.c:(.text+0x44c): undefined reference to `clk_set_parent'
mips-linux-ld: sound/soc/rockchip/rockchip_i2s_tdm.o: in function `rockchip_i2s_tdm_calibrate_mclk.isra.0':
>> rockchip_i2s_tdm.c:(.text+0x10d4): undefined reference to `clk_set_parent'
>> mips-linux-ld: rockchip_i2s_tdm.c:(.text+0x1180): undefined reference to `clk_set_parent'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


2021-12-07 11:33:03

by Nicolas Frattaroli

[permalink] [raw]
Subject: Re: rockchip_i2s_tdm.c:undefined reference to `clk_set_parent'

On Montag, 6. Dezember 2021 23:46:38 CET kernel test robot wrote:
> [...]
>
> All errors (new ones prefixed by >>):
>
> mips-linux-ld: sound/soc/jz4740/jz4740-i2s.o: in function `jz4740_i2s_set_sysclk':
> jz4740-i2s.c:(.text+0x3ec): undefined reference to `clk_set_parent'
> mips-linux-ld: jz4740-i2s.c:(.text+0x44c): undefined reference to `clk_set_parent'
> mips-linux-ld: sound/soc/rockchip/rockchip_i2s_tdm.o: in function `rockchip_i2s_tdm_calibrate_mclk.isra.0':
> >> rockchip_i2s_tdm.c:(.text+0x10d4): undefined reference to `clk_set_parent'
> >> mips-linux-ld: rockchip_i2s_tdm.c:(.text+0x1180): undefined reference to `clk_set_parent'
>

According to some previous conversations I've stumbled upon[1],
this appears to be due to certain MIPS configurations not
implementing the clock API properly, so they don't provide a
clk_set_parent despite advertising that they have support for
clocks.

So my question is: do I need to care about this? This hardware
will never be used on MIPS, and a lot of other drivers (as seen in
the errors snippet from the test robot) have the same issue, and
the problem is most likely not in my driver but in that specific
configuration's clock API implementation.


[1]: https://lore.kernel.org/lkml/[email protected]/



2021-12-07 13:11:12

by Mark Brown

[permalink] [raw]
Subject: Re: rockchip_i2s_tdm.c:undefined reference to `clk_set_parent'

On Tue, Dec 07, 2021 at 12:32:52PM +0100, Nicolas Frattaroli wrote:

> So my question is: do I need to care about this? This hardware
> will never be used on MIPS, and a lot of other drivers (as seen in
> the errors snippet from the test robot) have the same issue, and
> the problem is most likely not in my driver but in that specific
> configuration's clock API implementation.

It's fine, in theory you should care and add suitable dependencies but
in practice it's not bothering anyone and at this point I'd rather see
this sorted on the MIPS side, supporting things like this is just
ongoing hassle.


Attachments:
(No filename) (606.00 B)
signature.asc (488.00 B)
Download all attachments

2021-12-11 19:48:19

by Randy Dunlap

[permalink] [raw]
Subject: Re: rockchip_i2s_tdm.c:undefined reference to `clk_set_parent'

Hi--

On 12/7/21 03:32, Nicolas Frattaroli wrote:
> On Montag, 6. Dezember 2021 23:46:38 CET kernel test robot wrote:
>> [...]
>>
>> All errors (new ones prefixed by >>):
>>
>> mips-linux-ld: sound/soc/jz4740/jz4740-i2s.o: in function `jz4740_i2s_set_sysclk':
>> jz4740-i2s.c:(.text+0x3ec): undefined reference to `clk_set_parent'
>> mips-linux-ld: jz4740-i2s.c:(.text+0x44c): undefined reference to `clk_set_parent'
>> mips-linux-ld: sound/soc/rockchip/rockchip_i2s_tdm.o: in function `rockchip_i2s_tdm_calibrate_mclk.isra.0':
>>>> rockchip_i2s_tdm.c:(.text+0x10d4): undefined reference to `clk_set_parent'
>>>> mips-linux-ld: rockchip_i2s_tdm.c:(.text+0x1180): undefined reference to `clk_set_parent'
>>
>
> According to some previous conversations I've stumbled upon[1],
> this appears to be due to certain MIPS configurations not
> implementing the clock API properly, so they don't provide a
> clk_set_parent despite advertising that they have support for
> clocks.
>
> So my question is: do I need to care about this? This hardware
> will never be used on MIPS, and a lot of other drivers (as seen in
> the errors snippet from the test robot) have the same issue, and
> the problem is most likely not in my driver but in that specific
> configuration's clock API implementation.
>
>
> [1]: https://lore.kernel.org/lkml/[email protected]/

Yes, AFAIK this is fixed by:

commit fc1aabb08886
Author: Randy Dunlap <[email protected]>
Date: Sun Nov 14 17:20:51 2021 -0800

mips: lantiq: add support for clk_get_parent()


I can't reproduce this build error with the provided config file
in a current kernel tree.

--
~Randy