[tip:WIP.sched/core 162/162] include/linux/topology.h:204:9: error: implicit declaration of function 'cpumask_of_node'

From: kbuild test robot
Date: Sun Feb 05 2017 - 21:29:35 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 38c7fc1c938c469af27c032bf4eab0c4aaf4eba1
commit: 38c7fc1c938c469af27c032bf4eab0c4aaf4eba1 [162/162] sched/headers: Reduce header dependencies
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-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 38c7fc1c938c469af27c032bf4eab0c4aaf4eba1
# save the attached .config to linux build tree
make.cross ARCH=arm64

All error/warnings (new ones prefixed by >>):

In file included from include/linux/sched.h:26:0,
from arch/arm64/kernel/asm-offsets.c:21:
include/linux/topology.h: In function 'cpu_cpu_mask':
>> include/linux/topology.h:204:9: error: implicit declaration of function 'cpumask_of_node' [-Werror=implicit-function-declaration]
return cpumask_of_node(cpu_to_node(cpu));
^~~~~~~~~~~~~~~
>> include/linux/topology.h:204:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
return cpumask_of_node(cpu_to_node(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/include/asm/mmzone.h:6:0,
from include/linux/mmzone.h:889,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from arch/arm64/kernel/asm-offsets.c:22:
arch/arm64/include/asm/numa.h: At top level:
>> arch/arm64/include/asm/numa.h:14:0: warning: "node_distance" redefined
#define node_distance(a, b) __node_distance(a, b)

In file included from include/linux/sched.h:26:0,
from arch/arm64/kernel/asm-offsets.c:21:
include/linux/topology.h:49:0: note: this is the location of the previous definition
#define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)

In file included from arch/arm64/include/asm/mmzone.h:6:0,
from include/linux/mmzone.h:889,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from arch/arm64/kernel/asm-offsets.c:22:
>> arch/arm64/include/asm/numa.h:25:23: error: conflicting types for 'cpumask_of_node'
const struct cpumask *cpumask_of_node(int node);
^~~~~~~~~~~~~~~
In file included from include/linux/sched.h:26:0,
from arch/arm64/kernel/asm-offsets.c:21:
include/linux/topology.h:204:9: note: previous implicit declaration of 'cpumask_of_node' was here
return cpumask_of_node(cpu_to_node(cpu));
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +/cpumask_of_node +204 include/linux/topology.h

06931e62 Bartosz Golaszewski 2015-05-26 198 return topology_sibling_cpumask(cpu);
143e1e28 Vincent Guittot 2014-04-11 199 }
143e1e28 Vincent Guittot 2014-04-11 200 #endif
143e1e28 Vincent Guittot 2014-04-11 201
143e1e28 Vincent Guittot 2014-04-11 202 static inline const struct cpumask *cpu_cpu_mask(int cpu)
143e1e28 Vincent Guittot 2014-04-11 203 {
143e1e28 Vincent Guittot 2014-04-11 @204 return cpumask_of_node(cpu_to_node(cpu));
143e1e28 Vincent Guittot 2014-04-11 205 }
143e1e28 Vincent Guittot 2014-04-11 206
143e1e28 Vincent Guittot 2014-04-11 207

:::::: The code at line 204 was first introduced by commit
:::::: 143e1e28cb40bed836b0a06567208bd7347c9672 sched: Rework sched_domain topology definition

:::::: TO: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip