On Sun, May 2, 2021 at 9:28 PM kernel test robot <lkp@xxxxxxxxx> wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y > head: 370636ffbb8695e6af549011ad91a048c8cab267 > commit: 99f1960cae4f417d513be5ea55136383c2a58798 [5541/6083] stop_machine: mark helpers __always_inline > config: x86_64-randconfig-a002-20210502 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439) > 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 x86_64 cross compiling tool for clang build > # apt-get install binutils-x86-64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=99f1960cae4f417d513be5ea55136383c2a58798 > git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git > git fetch --no-tags stable linux-5.4.y > git checkout 99f1960cae4f417d513be5ea55136383c2a58798 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > All errors (new ones prefixed by >>): > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! I'm fairly sure this is unrelated to my patch, but I don't see what happened here. The function is defined in lib/memcat_p.c, which was added in v4.20, commit 93048c094415 ("lib: Fix ia64 bootloader linkage"), so it shouldn't fail in v5.4. The same release also introduced the only user in commit a23bbec205b9 ("stm class: Use memcat_p()"), and this is the one that causes the failure. I also see that drivers/hwtracing/stm/policy.c is the only file that actually calls memcat_p() (which is an inline function calling __memcat_p), so it's possible that the $(lib-y) object gets dropped by the linker because there are no other references to it from the kernel. However, in this case I would expect to see the same problem on mainline kernels, but I don't. Adding Alexander Shishkin to Cc, maybe he has seen this before. Arnd