arch/csky/kernel/ftrace.c:152:6: warning: no previous prototype for 'prepare_ftrace_return'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Julian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ecf93431963a95c0f475921101bedc0dd62ec96d
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date:   4 months ago
config: csky-randconfig-r026-20210816 (attached as .config)
compiler: csky-linux-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/torvalds/linux.git/commit/?id=7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> arch/csky/kernel/ftrace.c:152:6: warning: no previous prototype for 'prepare_ftrace_return' [-Wmissing-prototypes]
     152 | void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
         |      ^~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/prepare_ftrace_return +152 arch/csky/kernel/ftrace.c

89a3927a775c0a Guo Ren 2020-02-18  150  
d7950be145c84c Guo Ren 2018-12-15  151  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
d7950be145c84c Guo Ren 2018-12-15 @152  void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
d7950be145c84c Guo Ren 2018-12-15  153  			   unsigned long frame_pointer)
d7950be145c84c Guo Ren 2018-12-15  154  {
d7950be145c84c Guo Ren 2018-12-15  155  	unsigned long return_hooker = (unsigned long)&return_to_handler;
d7950be145c84c Guo Ren 2018-12-15  156  	unsigned long old;
230c77a5e92a29 Guo Ren 2018-12-09  157  
d7950be145c84c Guo Ren 2018-12-15  158  	if (unlikely(atomic_read(&current->tracing_graph_pause)))
d7950be145c84c Guo Ren 2018-12-15  159  		return;
230c77a5e92a29 Guo Ren 2018-12-09  160  
d7950be145c84c Guo Ren 2018-12-15  161  	old = *parent;
230c77a5e92a29 Guo Ren 2018-12-09  162  
d7950be145c84c Guo Ren 2018-12-15  163  	if (!function_graph_enter(old, self_addr,
d7950be145c84c Guo Ren 2018-12-15  164  			*(unsigned long *)frame_pointer, parent)) {
d7950be145c84c Guo Ren 2018-12-15  165  		/*
d7950be145c84c Guo Ren 2018-12-15  166  		 * For csky-gcc function has sub-call:
d7950be145c84c Guo Ren 2018-12-15  167  		 * subi	sp,	sp, 8
d7950be145c84c Guo Ren 2018-12-15  168  		 * stw	r8,	(sp, 0)
d7950be145c84c Guo Ren 2018-12-15  169  		 * mov	r8,	sp
d7950be145c84c Guo Ren 2018-12-15  170  		 * st.w r15,	(sp, 0x4)
d7950be145c84c Guo Ren 2018-12-15  171  		 * push	r15
d7950be145c84c Guo Ren 2018-12-15  172  		 * jl	_mcount
d7950be145c84c Guo Ren 2018-12-15  173  		 * We only need set *parent for resume
d7950be145c84c Guo Ren 2018-12-15  174  		 *
d7950be145c84c Guo Ren 2018-12-15  175  		 * For csky-gcc function has no sub-call:
d7950be145c84c Guo Ren 2018-12-15  176  		 * subi	sp,	sp, 4
d7950be145c84c Guo Ren 2018-12-15  177  		 * stw	r8,	(sp, 0)
d7950be145c84c Guo Ren 2018-12-15  178  		 * mov	r8,	sp
d7950be145c84c Guo Ren 2018-12-15  179  		 * push	r15
d7950be145c84c Guo Ren 2018-12-15  180  		 * jl	_mcount
d7950be145c84c Guo Ren 2018-12-15  181  		 * We need set *parent and *(frame_pointer + 4) for resume,
d7950be145c84c Guo Ren 2018-12-15  182  		 * because lr is resumed twice.
d7950be145c84c Guo Ren 2018-12-15  183  		 */
d7950be145c84c Guo Ren 2018-12-15  184  		*parent = return_hooker;
d7950be145c84c Guo Ren 2018-12-15  185  		frame_pointer += 4;
d7950be145c84c Guo Ren 2018-12-15  186  		if (*(unsigned long *)frame_pointer == old)
d7950be145c84c Guo Ren 2018-12-15  187  			*(unsigned long *)frame_pointer = return_hooker;
d7950be145c84c Guo Ren 2018-12-15  188  	}
230c77a5e92a29 Guo Ren 2018-12-09  189  }
28bb030f933344 Guo Ren 2019-03-01  190  

:::::: The code at line 152 was first introduced by commit
:::::: d7950be145c84ca5094c52bc1ad1e7f1893d0f19 csky: ftrace call graph supported.

:::::: TO: Guo Ren <ren_guo@xxxxxxxxx>
:::::: CC: Guo Ren <ren_guo@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux