Re: [tip:perf/core 1/2] kernel/events/core.c:181:48: error: redefinition of 'cpu_context' as different kind of symbol

From: Peter Zijlstra
Date: Thu Oct 27 2022 - 13:13:02 EST


On Thu, Oct 27, 2022 at 10:03:53PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
> head: dc39beffcfc19a8dd2a09c5818dcd1a4e9099033
> commit: 983bd8543b5ab8e9a2870ae258bccd4ce7a22c7c [1/2] perf: Rewrite core context handling
> config: mips-randconfig-r024-20221026
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
> 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-mips64el-linux-gnuabi64
> # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=983bd8543b5ab8e9a2870ae258bccd4ce7a22c7c
> git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
> git fetch --no-tags tip perf/core
> git checkout 983bd8543b5ab8e9a2870ae258bccd4ce7a22c7c
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> >> kernel/events/core.c:181:48: error: redefinition of 'cpu_context' as different kind of symbol
> static DEFINE_PER_CPU(struct perf_cpu_context, cpu_context);
> ^
> arch/mips/include/asm/mmu_context.h:106:19: note: previous definition is here
> static inline u64 cpu_context(unsigned int cpu, const struct mm_struct *mm)

*sigh*.. robot people.. this patch has sat in my queue.git for weeks now
:/

anyway, lemme go fix, this shouldn't be hard.