[tip:WIP.sched/core 117/162] arch/mips/netlogic/xlp/cop2-ex.c:97:8: error: implicit declaration of function 'capable'

From: kbuild test robot
Date: Mon Feb 06 2017 - 03:56:50 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 38c7fc1c938c469af27c032bf4eab0c4aaf4eba1
commit: 2a0a69844cd3beeb27830659a18397ef05e4f266 [117/162] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
config: mips-nlm_xlp_defconfig (attached as .config)
compiler: mips64-linux-gnuabi64-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2a0a69844cd3beeb27830659a18397ef05e4f266
# save the attached .config to linux build tree
make.cross ARCH=mips

All errors (new ones prefixed by >>):

arch/mips/netlogic/xlp/cop2-ex.c: In function 'nlm_cu2_call':
>> arch/mips/netlogic/xlp/cop2-ex.c:97:8: error: implicit declaration of function 'capable' [-Werror=implicit-function-declaration]
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
^~~~~~~
>> arch/mips/netlogic/xlp/cop2-ex.c:97:16: error: 'CAP_SYS_ADMIN' undeclared (first use in this function)
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
^~~~~~~~~~~~~
arch/mips/netlogic/xlp/cop2-ex.c:97:16: note: each undeclared identifier is reported only once for each function it appears in
>> arch/mips/netlogic/xlp/cop2-ex.c:97:43: error: 'CAP_SYS_RAWIO' undeclared (first use in this function)
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
^~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/capable +97 arch/mips/netlogic/xlp/cop2-ex.c

5649d37c Jayachandran C 2013-06-10 81 ".set pop\n"
5649d37c Jayachandran C 2013-06-10 82 : : "m"(*r), "r"(r->tx), "r"(r->rx));
5649d37c Jayachandran C 2013-06-10 83
5649d37c Jayachandran C 2013-06-10 84 __write_32bit_c2_register($2, 0, r->tx_msg_status);
5649d37c Jayachandran C 2013-06-10 85 rstat = __read_32bit_c2_register($3, 0) & 0xf0000000u;
5649d37c Jayachandran C 2013-06-10 86 __write_32bit_c2_register($3, 0, r->rx_msg_status | rstat);
5649d37c Jayachandran C 2013-06-10 87 }
5649d37c Jayachandran C 2013-06-10 88
5649d37c Jayachandran C 2013-06-10 89 static int nlm_cu2_call(struct notifier_block *nfb, unsigned long action,
5649d37c Jayachandran C 2013-06-10 90 void *data)
5649d37c Jayachandran C 2013-06-10 91 {
5649d37c Jayachandran C 2013-06-10 92 unsigned long flags;
5649d37c Jayachandran C 2013-06-10 93 unsigned int status;
5649d37c Jayachandran C 2013-06-10 94
5649d37c Jayachandran C 2013-06-10 95 switch (action) {
5649d37c Jayachandran C 2013-06-10 96 case CU2_EXCEPTION:
5649d37c Jayachandran C 2013-06-10 @97 if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
5649d37c Jayachandran C 2013-06-10 98 break;
5649d37c Jayachandran C 2013-06-10 99 local_irq_save(flags);
5649d37c Jayachandran C 2013-06-10 100 KSTK_STATUS(current) |= ST0_CU2;
5649d37c Jayachandran C 2013-06-10 101 status = read_c0_status();
5649d37c Jayachandran C 2013-06-10 102 write_c0_status(status | ST0_CU2);
5649d37c Jayachandran C 2013-06-10 103 nlm_cop2_restore(&(current->thread.cp2));
5649d37c Jayachandran C 2013-06-10 104 write_c0_status(status & ~ST0_CU2);
5649d37c Jayachandran C 2013-06-10 105 local_irq_restore(flags);

:::::: The code at line 97 was first introduced by commit
:::::: 5649d37c2b23ad6545709c976b9abbfa8d5f4e11 MIPS: Netlogic: COP2 save/restore code

:::::: TO: Jayachandran C <jchandra@xxxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip