linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ingenic-adc.c:undefined reference to `clk_get_parent'
@ 2021-03-16 15:54 kernel test robot
  2021-04-26  5:43 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2021-03-16 15:54 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: kbuild-all, linux-kernel, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: a07a4fe5ff460e99293c0d682421920d54e31d7f iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h
date:   8 months ago
config: mips-randconfig-p001-20210316 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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=a07a4fe5ff460e99293c0d682421920d54e31d7f
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a07a4fe5ff460e99293c0d682421920d54e31d7f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
>> ingenic-adc.c:(.text+0x8c): undefined reference to `clk_get_parent'
   mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
   ingenic-adc.c:(.text+0x164): undefined reference to `clk_get_parent'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25927 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ingenic-adc.c:undefined reference to `clk_get_parent'
  2021-03-16 15:54 ingenic-adc.c:undefined reference to `clk_get_parent' kernel test robot
@ 2021-04-26  5:43 ` Randy Dunlap
  2021-04-26  8:22   ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-04-26  5:43 UTC (permalink / raw)
  To: kernel test robot, Jonathan Cameron, linux-clk
  Cc: kbuild-all, linux-kernel, Andy Shevchenko, Stephen Boyd,
	Michael Turquette

[add linux-clk + maintainers]

On 3/16/21 8:54 AM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
> commit: a07a4fe5ff460e99293c0d682421920d54e31d7f iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h
> date:   8 months ago
> config: mips-randconfig-p001-20210316 (attached as .config)
> compiler: mips-linux-gcc (GCC) 9.3.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=a07a4fe5ff460e99293c0d682421920d54e31d7f
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout a07a4fe5ff460e99293c0d682421920d54e31d7f
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
>>> ingenic-adc.c:(.text+0x8c): undefined reference to `clk_get_parent'
>    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
>    ingenic-adc.c:(.text+0x164): undefined reference to `clk_get_parent'

Hi,

My guess (analysis) suggests that this problem is due to
a difference in when clk_get_parent() is available between
<linux/clk.h> where it depends on CONFIG_HAVE_CLK and
drivers/clk/clk.c, which is built iff CONFIG_COMMON_CLK.

Any comments/suggestions?

thanks.
-- 
~Randy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ingenic-adc.c:undefined reference to `clk_get_parent'
  2021-04-26  5:43 ` Randy Dunlap
@ 2021-04-26  8:22   ` Andy Shevchenko
  2021-04-26 21:05     ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-04-26  8:22 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kernel test robot, Jonathan Cameron, linux-clk, kbuild-all,
	Linux Kernel Mailing List, Stephen Boyd, Michael Turquette

On Mon, Apr 26, 2021 at 8:43 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> [add linux-clk + maintainers]
>
> On 3/16/21 8:54 AM, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
> > commit: a07a4fe5ff460e99293c0d682421920d54e31d7f iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h
> > date:   8 months ago
> > config: mips-randconfig-p001-20210316 (attached as .config)
> > compiler: mips-linux-gcc (GCC) 9.3.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=a07a4fe5ff460e99293c0d682421920d54e31d7f
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout a07a4fe5ff460e99293c0d682421920d54e31d7f
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
> >>> ingenic-adc.c:(.text+0x8c): undefined reference to `clk_get_parent'
> >    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
> >    ingenic-adc.c:(.text+0x164): undefined reference to `clk_get_parent'
>
> Hi,
>
> My guess (analysis) suggests that this problem is due to
> a difference in when clk_get_parent() is available between
> <linux/clk.h> where it depends on CONFIG_HAVE_CLK and
> drivers/clk/clk.c, which is built iff CONFIG_COMMON_CLK.
>
> Any comments/suggestions?

I haven't looked into it, but IIRC MIPS has its own clock API
implementation (or I mixed it with another arch?) and that's the root
of many issues like this around the kernel.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ingenic-adc.c:undefined reference to `clk_get_parent'
  2021-04-26  8:22   ` Andy Shevchenko
@ 2021-04-26 21:05     ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-04-26 21:05 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kernel test robot, Jonathan Cameron, linux-clk, kbuild-all,
	Linux Kernel Mailing List, Stephen Boyd, Michael Turquette

On 4/26/21 1:22 AM, Andy Shevchenko wrote:
> On Mon, Apr 26, 2021 at 8:43 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> [add linux-clk + maintainers]
>>
>> On 3/16/21 8:54 AM, kernel test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
>>> commit: a07a4fe5ff460e99293c0d682421920d54e31d7f iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h
>>> date:   8 months ago
>>> config: mips-randconfig-p001-20210316 (attached as .config)
>>> compiler: mips-linux-gcc (GCC) 9.3.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=a07a4fe5ff460e99293c0d682421920d54e31d7f
>>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>         git fetch --no-tags linus master
>>>         git checkout a07a4fe5ff460e99293c0d682421920d54e31d7f
>>>         # save the attached .config to linux build tree
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
>>>>> ingenic-adc.c:(.text+0x8c): undefined reference to `clk_get_parent'
>>>    mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
>>>    ingenic-adc.c:(.text+0x164): undefined reference to `clk_get_parent'
>>
>> Hi,
>>
>> My guess (analysis) suggests that this problem is due to
>> a difference in when clk_get_parent() is available between
>> <linux/clk.h> where it depends on CONFIG_HAVE_CLK and
>> drivers/clk/clk.c, which is built iff CONFIG_COMMON_CLK.
>>
>> Any comments/suggestions?
> 
> I haven't looked into it, but IIRC MIPS has its own clock API
> implementation (or I mixed it with another arch?) and that's the root
> of many issues like this around the kernel.


Thanks. I do see that (MIPS) CONFIG_RA7 and CONFIG_RALINK
provide their own clk_get_parent(), but neither of those is
enabled in the kernel config file.

I'll post some kind of patch later today.

-- 
~Randy


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-26 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 15:54 ingenic-adc.c:undefined reference to `clk_get_parent' kernel test robot
2021-04-26  5:43 ` Randy Dunlap
2021-04-26  8:22   ` Andy Shevchenko
2021-04-26 21:05     ` Randy Dunlap

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).