arch/mips/include/asm/mips-cm.h:165: undefined reference to `mips_gcr_base'

From: kbuild test robot
Date: Sat Dec 14 2019 - 02:03:00 EST


Hi Thomas,

It's probably a bug fix that unveils the link errors.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 37d4e84f765bb3038ddfeebdc5d1cfd7e1ef688f
commit: 46f1619500d022501a4f0389f9f4c349ab46bb86 MIPS: include: Mark __xchg as __always_inline
date: 9 weeks ago
config: mips-randconfig-a001-20191213 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 46f1619500d022501a4f0389f9f4c349ab46bb86
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

arch/mips/kernel/traps.o: In function `addr_gcr_err_control':
>> arch/mips/include/asm/mips-cm.h:165: undefined reference to `mips_gcr_base'
>> arch/mips/include/asm/mips-cm.h:165: undefined reference to `mips_gcr_base'

vim +165 arch/mips/include/asm/mips-cm.h

93c5bba575cedb Paul Burton 2017-08-12 163
93c5bba575cedb Paul Burton 2017-08-12 164 /* GCR_ERR_CONTROL - Control error checking logic */
b025d51873d5fe Paul Burton 2017-08-12 @165 GCR_ACCESSOR_RW(32, 0x038, err_control)
93c5bba575cedb Paul Burton 2017-08-12 166 #define CM_GCR_ERR_CONTROL_L2_ECC_EN BIT(1)
93c5bba575cedb Paul Burton 2017-08-12 167 #define CM_GCR_ERR_CONTROL_L2_ECC_SUPPORT BIT(0)
93c5bba575cedb Paul Burton 2017-08-12 168

:::::: The code at line 165 was first introduced by commit
:::::: b025d51873d5fe6f05f8e94174282cb00ef1f489 MIPS: CM: Specify register size when generating accessors

:::::: TO: Paul Burton <paul.burton@xxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip