[ardb:arm32-ftrace-fixes 46/50] arch/arm/kernel/ftrace.c:239:39: error: 'struct stackframe' has no member named 'lr_addr'

From: kernel test robot
Date: Thu Jan 27 2022 - 15:30:28 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm32-ftrace-fixes
head: db81a4be9a228c6d728b5e10ada88553cc72a001
commit: 94e8ea79256baf12b39634037ff5336c1930308e [46/50] ARM: ftrace: enable the graph tracer with the EABI unwinder
config: arm-buildonly-randconfig-r006-20220124 (https://download.01.org/0day-ci/archive/20220128/202201280425.w2sPQp19-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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/ardb/linux.git/commit/?id=94e8ea79256baf12b39634037ff5336c1930308e
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm32-ftrace-fixes
git checkout 94e8ea79256baf12b39634037ff5336c1930308e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/

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/arm/kernel/ftrace.c:216:6: warning: no previous prototype for 'prepare_ftrace_return' [-Wmissing-prototypes]
216 | void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
| ^~~~~~~~~~~~~~~~~~~~~
arch/arm/kernel/ftrace.c: In function 'prepare_ftrace_return':
>> arch/arm/kernel/ftrace.c:239:39: error: 'struct stackframe' has no member named 'lr_addr'
239 | parent = frame.lr_addr;
| ^


vim +239 arch/arm/kernel/ftrace.c

213
214 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
215 asmlinkage
216 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
217 unsigned long frame_pointer,
218 unsigned long stack_pointer)
219 {
220 unsigned long return_hooker = (unsigned long) &return_to_handler;
221 unsigned long old;
222
223 if (unlikely(atomic_read(&current->tracing_graph_pause)))
224 return;
225
226 if (IS_ENABLED(CONFIG_UNWINDER_FRAME_POINTER)) {
227 /* FP points one word below parent's top of stack */
228 frame_pointer += 4;
229 } else {
230 struct stackframe frame = {
231 .fp = frame_pointer,
232 .sp = stack_pointer,
233 .lr = self_addr,
234 .pc = self_addr,
235 };
236 if (unwind_frame(&frame) < 0)
237 return;
238 if (frame.lr != self_addr)
> 239 parent = frame.lr_addr;
240 frame_pointer = frame.sp;
241 }
242
243 old = *parent;
244 *parent = return_hooker;
245
246 if (function_graph_enter(old, self_addr, frame_pointer, NULL))
247 *parent = old;
248 }
249

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx