On 8/16/20 11:43 PM, kernel test robot wrote:
Hi Lukasz,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 1bc138c622959979eb547be2d3bbc6442a5c80b0 PM / EM: add support for other devices than CPUs in Energy Model
date: 8 weeks ago
config: mips-randconfig-r001-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout 1bc138c622959979eb547be2d3bbc6442a5c80b0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:74:
In file included from include/linux/time32.h:13:
In file included from include/linux/timex.h:65:
In file included from arch/mips/include/asm/timex.h:19:
In file included from arch/mips/include/asm/cpu-type.h:12:
In file included from include/linux/smp.h:15:
include/linux/llist.h:222:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&head->first, NULL);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
It looks like the energy_model.h causes this include on mips then some
header is missing (probably smp.h from mips/asm).
I will try to reproduce it and propose a fix.