linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2'
@ 2022-01-05 19:02 kernel test robot
  2022-01-05 20:18 ` Nick Terrell
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-01-05 19:02 UTC (permalink / raw)
  To: Nick Terrell; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: e0c1b49f5b674cca7b10549c53b3791d0bbc90a8 lib: zstd: Upgrade to latest upstream zstd version 1.4.10
date:   8 weeks ago
config: mips-randconfig-r025-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060233.mO6P39bM-lkp@intel.com/config)
compiler: mips64el-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=e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
        # 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 <lkp@intel.com>

All errors (new ones prefixed by >>):

   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `FSE_buildDTable_internal':
>> decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2'
   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `BIT_initDStream':
   decompress.c:(.text.BIT_initDStream+0x7c): undefined reference to `__clzdi2'
   mips64el-linux-ld: decompress.c:(.text.BIT_initDStream+0x158): undefined reference to `__clzdi2'
   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `ZSTD_buildFSETable_body_default.constprop.0':
>> decompress.c:(.text.ZSTD_buildFSETable_body_default.constprop.0+0x2a8): undefined reference to `__clzdi2'
   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `FSE_readNCount_body_default':
>> decompress.c:(.text.FSE_readNCount_body_default+0x130): undefined reference to `__ctzdi2'
>> mips64el-linux-ld: decompress.c:(.text.FSE_readNCount_body_default+0x1a4): undefined reference to `__ctzdi2'
>> mips64el-linux-ld: decompress.c:(.text.FSE_readNCount_body_default+0x2e4): undefined reference to `__clzdi2'
   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `HUF_readStats_body_default':
>> decompress.c:(.text.HUF_readStats_body_default+0x184): undefined reference to `__clzdi2'
>> mips64el-linux-ld: decompress.c:(.text.HUF_readStats_body_default+0x1b4): undefined reference to `__clzdi2'
   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `ZSTD_DCtx_getParameter':
>> decompress.c:(.text.ZSTD_DCtx_getParameter+0x60): undefined reference to `__clzdi2'

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

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

* Re: decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2'
  2022-01-05 19:02 decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2' kernel test robot
@ 2022-01-05 20:18 ` Nick Terrell
  2022-01-07 17:31   ` Paul Cercueil
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Terrell @ 2022-01-05 20:18 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, Linux Kernel Mailing List,
	open list:BROADCOM NVRAM DRIVER, Paul Cercueil



> On Jan 5, 2022, at 11:02 AM, kernel test robot <lkp@intel.com> wrote:
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
> commit: e0c1b49f5b674cca7b10549c53b3791d0bbc90a8 lib: zstd: Upgrade to latest upstream zstd version 1.4.10
> date:   8 weeks ago
> config: mips-randconfig-r025-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060233.mO6P39bM-lkp@intel.com/config )
> compiler: mips64el-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=e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
>        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>        git fetch --no-tags linus master
>        git checkout e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
>        # 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 <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `FSE_buildDTable_internal':
>>> decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2'
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `BIT_initDStream':
>   decompress.c:(.text.BIT_initDStream+0x7c): undefined reference to `__clzdi2'
>   mips64el-linux-ld: decompress.c:(.text.BIT_initDStream+0x158): undefined reference to `__clzdi2'
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `ZSTD_buildFSETable_body_default.constprop.0':
>>> decompress.c:(.text.ZSTD_buildFSETable_body_default.constprop.0+0x2a8): undefined reference to `__clzdi2'
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `FSE_readNCount_body_default':
>>> decompress.c:(.text.FSE_readNCount_body_default+0x130): undefined reference to `__ctzdi2'
>>> mips64el-linux-ld: decompress.c:(.text.FSE_readNCount_body_default+0x1a4): undefined reference to `__ctzdi2'
>>> mips64el-linux-ld: decompress.c:(.text.FSE_readNCount_body_default+0x2e4): undefined reference to `__clzdi2'
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `HUF_readStats_body_default':
>>> decompress.c:(.text.HUF_readStats_body_default+0x184): undefined reference to `__clzdi2'
>>> mips64el-linux-ld: decompress.c:(.text.HUF_readStats_body_default+0x1b4): undefined reference to `__clzdi2'
>   mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `ZSTD_DCtx_getParameter':
>>> decompress.c:(.text.ZSTD_DCtx_getParameter+0x60): undefined reference to `__clzdi2'

These are complaining about usage of __builtin_c{l,t}z(). The code before this change also used
__builtin_clz(), so this isn't new. E.g. the call in BIT_initDStream() is present before the change,
it just moved locations. So these errors aren't new.

This is breaking the MIPS boot code when zstd compressed kernels are enabled, and was
Introduced in commit a510b61613 [0][1]. The fix is to include the definitions from `lib/clz_ctz.c` [2].
The same problem was fixed for s390 in this patch [3].

CC: Paul Cercueil

Best,
Nick Terrell

[0] https://lore.kernel.org/lkml/20200901142651.1165237-3-paul@crapouillou.net/
[1] https://github.com/torvalds/linux/commit/a510b616131f85215ba156ed67e5ed1c0701f80f
[2] https://github.com/torvalds/linux/blob/master/lib/clz_ctz.c
[3] https://lore.kernel.org/all/patch-1.thread-f0f589.git-f0f58936888f.your-ad-here.call-01627564869-ext-2765@work.hours/

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


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

* Re: decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2'
  2022-01-05 20:18 ` Nick Terrell
@ 2022-01-07 17:31   ` Paul Cercueil
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Cercueil @ 2022-01-07 17:31 UTC (permalink / raw)
  To: Nick Terrell
  Cc: kernel test robot, kbuild-all, Linux Kernel Mailing List,
	BROADCOM NVRAM DRIVER

Hi Nick,

Le mer., janv. 5 2022 at 20:18:27 +0000, Nick Terrell <terrelln@fb.com> 
a écrit :
> 
> 
>>  On Jan 5, 2022, at 11:02 AM, kernel test robot <lkp@intel.com> 
>> wrote:
>> 
>>  tree:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>> master
>>  head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
>>  commit: e0c1b49f5b674cca7b10549c53b3791d0bbc90a8 lib: zstd: Upgrade 
>> to latest upstream zstd version 1.4.10
>>  date:   8 weeks ago
>>  config: mips-randconfig-r025-20220105 
>> (https://download.01.org/0day-ci/archive/20220106/202201060233.mO6P39bM-lkp@intel.com/config 
>> )
>>  compiler: mips64el-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=e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
>>         git remote add linus 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>         git fetch --no-tags linus master
>>         git checkout e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
>>         # 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 <lkp@intel.com>
>> 
>>  All errors (new ones prefixed by >>):
>> 
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `FSE_buildDTable_internal':
>>>>  decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined 
>>>> reference to `__clzdi2'
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `BIT_initDStream':
>>    decompress.c:(.text.BIT_initDStream+0x7c): undefined reference to 
>> `__clzdi2'
>>    mips64el-linux-ld: decompress.c:(.text.BIT_initDStream+0x158): 
>> undefined reference to `__clzdi2'
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `ZSTD_buildFSETable_body_default.constprop.0':
>>>>  
>>>> decompress.c:(.text.ZSTD_buildFSETable_body_default.constprop.0+0x2a8): 
>>>> undefined reference to `__clzdi2'
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `FSE_readNCount_body_default':
>>>>  decompress.c:(.text.FSE_readNCount_body_default+0x130): undefined 
>>>> reference to `__ctzdi2'
>>>>  mips64el-linux-ld: 
>>>> decompress.c:(.text.FSE_readNCount_body_default+0x1a4): undefined 
>>>> reference to `__ctzdi2'
>>>>  mips64el-linux-ld: 
>>>> decompress.c:(.text.FSE_readNCount_body_default+0x2e4): undefined 
>>>> reference to `__clzdi2'
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `HUF_readStats_body_default':
>>>>  decompress.c:(.text.HUF_readStats_body_default+0x184): undefined 
>>>> reference to `__clzdi2'
>>>>  mips64el-linux-ld: 
>>>> decompress.c:(.text.HUF_readStats_body_default+0x1b4): undefined 
>>>> reference to `__clzdi2'
>>    mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in 
>> function `ZSTD_DCtx_getParameter':
>>>>  decompress.c:(.text.ZSTD_DCtx_getParameter+0x60): undefined 
>>>> reference to `__clzdi2'
> 
> These are complaining about usage of __builtin_c{l,t}z(). The code 
> before this change also used
> __builtin_clz(), so this isn't new. E.g. the call in 
> BIT_initDStream() is present before the change,
> it just moved locations. So these errors aren't new.
> 
> This is breaking the MIPS boot code when zstd compressed kernels are 
> enabled, and was
> Introduced in commit a510b61613 [0][1]. The fix is to include the 
> definitions from `lib/clz_ctz.c` [2].
> The same problem was fixed for s390 in this patch [3].
> 
> CC: Paul Cercueil

Thanks, I'll send a patch.

Cheers,
-Paul



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

end of thread, other threads:[~2022-01-07 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 19:02 decompress.c:(.text.FSE_buildDTable_internal+0x2cc): undefined reference to `__clzdi2' kernel test robot
2022-01-05 20:18 ` Nick Terrell
2022-01-07 17:31   ` Paul Cercueil

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