[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210130405.Pl7j2UsD-lkp@intel.com>
Date: Thu, 13 Oct 2022 04:30:03 +0800
From: kernel test robot <lkp@...el.com>
To: Mark Rutland <mark.rutland@....com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [mark:arm64/ftrace/minimal-regs 2/5]
arch/x86/include/asm/ftrace.h:72:7: error: incomplete definition of type
'struct ftrace_regs'
Hi Mark,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/ftrace/minimal-regs
head: a6fb93c9bc584bf123d18caa80dd6f7a083c272b
commit: 232e6c0b017984c54270b4a7805504a20db4c4df [2/5] ftrace: pass fregs to arch_ftrace_set_direct_caller()
config: i386-randconfig-a013
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=232e6c0b017984c54270b4a7805504a20db4c4df
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/ftrace/minimal-regs
git checkout 232e6c0b017984c54270b4a7805504a20db4c4df
# 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=i386 prepare
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/asm-offsets.c:22:
In file included from arch/x86/kernel/../kvm/vmx/vmx.h:5:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/ftrace.h:23:
arch/x86/include/asm/ftrace.h:69:57: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function [-Wvisibility]
static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr)
^
>> arch/x86/include/asm/ftrace.h:72:7: error: incomplete definition of type 'struct ftrace_regs'
fregs->regs.orig_ax = addr;
~~~~~^
arch/x86/include/asm/ftrace.h:69:57: note: forward declaration of 'struct ftrace_regs'
static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr)
^
1 warning and 1 error generated.
make[2]: *** [scripts/Makefile.build:118: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:1270: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:231: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +72 arch/x86/include/asm/ftrace.h
61
62 /*
63 * When a ftrace registered caller is tracing a function that is
64 * also set by a register_ftrace_direct() call, it needs to be
65 * differentiated in the ftrace_caller trampoline. To do this, we
66 * place the direct caller in the ORIG_AX part of pt_regs. This
67 * tells the ftrace_caller that there's a direct caller.
68 */
69 static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr)
70 {
71 /* Emulate a call */
> 72 fregs->regs.orig_ax = addr;
73 }
74
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (155185 bytes)
Powered by blists - more mailing lists