[tip:WIP.sched/core 138/170] arch/mips/loongson64/loongson-3/smp.c:393:32: note: in expansion of macro '__KSTK_TOS'

From: kbuild test robot
Date: Mon Feb 06 2017 - 19:35:55 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 8b88220c2b48c511c3dc8210d92a1d99d180dd69
commit: b8dca9f8769ff647742c30f21f5fab0b6a591578 [138/170] sched/headers: Split <linux/sched/task_stack.h> out of <linux/sched.h>
config: mips-loongson3_defconfig (attached as .config)
compiler: mips64el-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 b8dca9f8769ff647742c30f21f5fab0b6a591578
# 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/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/node.h:17,
from include/linux/cpu.h:16,
from arch/mips/loongson64/loongson-3/smp.c:18:
arch/mips/loongson64/loongson-3/smp.c: In function 'loongson3_boot_secondary':
arch/mips/include/asm/processor.h:384:41: error: implicit declaration of function 'task_stack_page' [-Werror=implicit-function-declaration]
#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \
^
>> arch/mips/loongson64/loongson-3/smp.c:393:32: note: in expansion of macro '__KSTK_TOS'
startargs[1] = (unsigned long)__KSTK_TOS(idle);
^~~~~~~~~~
cc1: some warnings being treated as errors

vim +/__KSTK_TOS +393 arch/mips/loongson64/loongson-3/smp.c

300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 377 {
c4a987db arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 378 init_cpu_present(cpu_possible_mask);
c4a987db arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 379 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 380 }
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 381
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 382 /*
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 383 * Setup the PC, SP, and GP of a secondary processor and start it runing!
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 384 */
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 385 static void loongson3_boot_secondary(int cpu, struct task_struct *idle)
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 386 {
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 387 unsigned long startargs[4];
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 388
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 389 pr_info("Booting CPU#%d...\n", cpu);
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 390
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 391 /* startargs[] are initial PC, SP and GP for secondary CPU */
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 392 startargs[0] = (unsigned long)&smp_bootstrap;
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 @393 startargs[1] = (unsigned long)__KSTK_TOS(idle);
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 394 startargs[2] = (unsigned long)task_thread_info(idle);
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 395 startargs[3] = 0;
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 396
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 397 pr_debug("CPU#%d, func_pc=%lx, sp=%lx, gp=%lx\n",
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 398 cpu, startargs[0], startargs[1], startargs[2]);
300459d5 arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-03-21 399
ec0f8d3f arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-11-04 400 loongson3_ipi_write64(startargs[3],
ec0f8d3f arch/mips/loongson/loongson-3/smp.c Huacai Chen 2014-11-04 401 (void *)(ipi_mailbox_buf[cpu_logical_map(cpu)]+0x18));

:::::: The code at line 393 was first introduced by commit
:::::: 300459d558725cdada5ddebbe52c24ef6e1853d3 MIPS: Loongson 3: Add Loongson-3 SMP support

:::::: TO: Huacai Chen <chenhc@xxxxxxxxxx>
:::::: 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