[tip:WIP.sched/core 118/144] arch/mips/cavium-octeon/cpu.c:31:3: note: in expansion of macro 'KSTK_STATUS'

From: kbuild test robot
Date: Sat Feb 04 2017 - 01:39:07 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: f83f0b0647162b099f62e62c203b1cfb90b40239
commit: 297dfd2a653a202557af465e87e0aa5d106a15b1 [118/144] sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
config: mips-cavium_octeon_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 297dfd2a653a202557af465e87e0aa5d106a15b1
# save the attached .config to linux build tree
make.cross ARCH=mips

All warnings (new ones prefixed by >>):

In file included from arch/mips/include/asm/thread_info.h:15:0,
from include/linux/thread_info.h:25,
from include/asm-generic/current.h:4,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/mutex.h:13,
from include/linux/notifier.h:13,
from arch/mips/cavium-octeon/cpu.c:11:
arch/mips/cavium-octeon/cpu.c: In function 'cnmips_cu2_call':
arch/mips/include/asm/processor.h:385:31: error: invalid application of 'sizeof' to incomplete type 'struct pt_regs'
THREAD_SIZE - 32 - sizeof(struct pt_regs))
^
arch/mips/include/asm/processor.h:386:46: note: in expansion of macro '__KSTK_TOS'
#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk))
^~~~~~~~~~
arch/mips/include/asm/processor.h:389:27: note: in expansion of macro 'task_pt_regs'
#define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status)
^~~~~~~~~~~~
>> arch/mips/cavium-octeon/cpu.c:31:3: note: in expansion of macro 'KSTK_STATUS'
KSTK_STATUS(current) |= ST0_CU2;
^~~~~~~~~~~

vim +/KSTK_STATUS +31 arch/mips/cavium-octeon/cpu.c

69f3a7de Ralf Baechle 2009-11-24 15 #include <asm/cop2.h>
69f3a7de Ralf Baechle 2009-11-24 16 #include <asm/current.h>
69f3a7de Ralf Baechle 2009-11-24 17 #include <asm/mipsregs.h>
69f3a7de Ralf Baechle 2009-11-24 18 #include <asm/page.h>
69f3a7de Ralf Baechle 2009-11-24 19 #include <asm/octeon/octeon.h>
69f3a7de Ralf Baechle 2009-11-24 20
69f3a7de Ralf Baechle 2009-11-24 21 static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action,
69f3a7de Ralf Baechle 2009-11-24 22 void *data)
69f3a7de Ralf Baechle 2009-11-24 23 {
69f3a7de Ralf Baechle 2009-11-24 24 unsigned long flags;
69f3a7de Ralf Baechle 2009-11-24 25 unsigned int status;
69f3a7de Ralf Baechle 2009-11-24 26
69f3a7de Ralf Baechle 2009-11-24 27 switch (action) {
69f3a7de Ralf Baechle 2009-11-24 28 case CU2_EXCEPTION:
69f3a7de Ralf Baechle 2009-11-24 29 prefetch(&current->thread.cp2);
69f3a7de Ralf Baechle 2009-11-24 30 local_irq_save(flags);
69f3a7de Ralf Baechle 2009-11-24 @31 KSTK_STATUS(current) |= ST0_CU2;
69f3a7de Ralf Baechle 2009-11-24 32 status = read_c0_status();
69f3a7de Ralf Baechle 2009-11-24 33 write_c0_status(status | ST0_CU2);
69f3a7de Ralf Baechle 2009-11-24 34 octeon_cop2_restore(&(current->thread.cp2));
69f3a7de Ralf Baechle 2009-11-24 35 write_c0_status(status & ~ST0_CU2);
69f3a7de Ralf Baechle 2009-11-24 36 local_irq_restore(flags);
69f3a7de Ralf Baechle 2009-11-24 37
69f3a7de Ralf Baechle 2009-11-24 38 return NOTIFY_BAD; /* Don't call default notifier */
69f3a7de Ralf Baechle 2009-11-24 39 }

:::::: The code at line 31 was first introduced by commit
:::::: 69f3a7de1f1ec935924b1b13f83812f8b30e92ce MIPS: Modularize COP2 handling

:::::: TO: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
:::::: 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