arch/powerpc/perf/perf_regs.c:80: undefined reference to `.is_sier_available'

From: kbuild test robot
Date: Mon Dec 16 2019 - 13:41:55 EST


Hi Sebastian,

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: d1eef1c619749b2a57e514a3fa67d9a516ffa919
commit: 9b8303fc6efa724bd6a90656434fbde2cc6ceb2c nvmem: core: fix nvmem_cell_write inline function
date: 6 weeks ago
config: powerpc-randconfig-a001-20191216 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.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 9b8303fc6efa724bd6a90656434fbde2cc6ceb2c
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc

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

All errors (new ones prefixed by >>):

powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
arch/powerpc/perf/perf_regs.o: In function `perf_reg_value':
>> arch/powerpc/perf/perf_regs.c:80: undefined reference to `.is_sier_available'

vim +80 arch/powerpc/perf/perf_regs.c

ed4a4ef85cf5b7 Anju T 2016-02-20 71
ed4a4ef85cf5b7 Anju T 2016-02-20 72 u64 perf_reg_value(struct pt_regs *regs, int idx)
ed4a4ef85cf5b7 Anju T 2016-02-20 73 {
ed4a4ef85cf5b7 Anju T 2016-02-20 74 if (WARN_ON_ONCE(idx >= PERF_REG_POWERPC_MAX))
ed4a4ef85cf5b7 Anju T 2016-02-20 75 return 0;
ed4a4ef85cf5b7 Anju T 2016-02-20 76
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 77 if (idx == PERF_REG_POWERPC_SIER &&
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 78 (IS_ENABLED(CONFIG_FSL_EMB_PERF_EVENT) ||
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 79 IS_ENABLED(CONFIG_PPC32) ||
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 @80 !is_sier_available()))
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 81 return 0;
333804dc3b7a92 Madhavan Srinivasan 2018-12-09 82
6529870cb03238 Madhavan Srinivasan 2018-12-09 83 if (idx == PERF_REG_POWERPC_MMCRA &&
6529870cb03238 Madhavan Srinivasan 2018-12-09 84 (IS_ENABLED(CONFIG_FSL_EMB_PERF_EVENT) ||
6529870cb03238 Madhavan Srinivasan 2018-12-09 85 IS_ENABLED(CONFIG_PPC32)))
6529870cb03238 Madhavan Srinivasan 2018-12-09 86 return 0;
6529870cb03238 Madhavan Srinivasan 2018-12-09 87
ed4a4ef85cf5b7 Anju T 2016-02-20 88 return regs_get_register(regs, pt_regs_offset[idx]);
ed4a4ef85cf5b7 Anju T 2016-02-20 89 }
ed4a4ef85cf5b7 Anju T 2016-02-20 90

:::::: The code at line 80 was first introduced by commit
:::::: 333804dc3b7a92158ab63a48febff0d8ef89ada3 powerpc/perf: Update perf_regs structure to include SIER

:::::: TO: Madhavan Srinivasan <maddy@xxxxxxxxxxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@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