[arm-platforms:irq/rvic 14/39] arch/arm64/kernel/irq.c:75:2: error: implicit declaration of function 'nmi_enter'

kernel test robot lkp at intel.com
Thu Sep 3 08:42:17 EDT 2020


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/rvic
head:   0bec9c23bdbd7250dd96f881c9da3f86b220b312
commit: 077d7c3e65a6e393dc23e6d0e1570969b4b1594e [14/39] arm64: Remove custom IRQ stat accounting
config: arm64-randconfig-r024-20200903 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1284dc34abd11ce4275ad21c0470ad8c679b59b7)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git checkout 077d7c3e65a6e393dc23e6d0e1570969b4b1594e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   arch/arm64/kernel/irq.c:53:13: warning: no previous prototype for function 'init_IRQ' [-Wmissing-prototypes]
   void __init init_IRQ(void)
               ^
   arch/arm64/kernel/irq.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __init init_IRQ(void)
   ^
   static 
>> arch/arm64/kernel/irq.c:75:2: error: implicit declaration of function 'nmi_enter' [-Werror,-Wimplicit-function-declaration]
           nmi_enter();
           ^
   arch/arm64/kernel/irq.c:73:25: warning: no previous prototype for function 'asm_nmi_enter' [-Wmissing-prototypes]
   asmlinkage void notrace asm_nmi_enter(void)
                           ^
   arch/arm64/kernel/irq.c:73:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void notrace asm_nmi_enter(void)
              ^
              static 
>> arch/arm64/kernel/irq.c:81:2: error: implicit declaration of function 'nmi_exit' [-Werror,-Wimplicit-function-declaration]
           nmi_exit();
           ^
   arch/arm64/kernel/irq.c:79:25: warning: no previous prototype for function 'asm_nmi_exit' [-Wmissing-prototypes]
   asmlinkage void notrace asm_nmi_exit(void)
                           ^
   arch/arm64/kernel/irq.c:79:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void notrace asm_nmi_exit(void)
              ^
              static 
>> arch/arm64/kernel/irq.c:25:32: error: tentative definition has type 'typeof(struct nmi_ctx)' (aka 'struct nmi_ctx') that is never completed
   DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts);
                                  ^
   arch/arm64/kernel/irq.c:25:23: note: forward declaration of 'struct nmi_ctx'
   DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts);
                         ^
   3 warnings and 3 errors generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=077d7c3e65a6e393dc23e6d0e1570969b4b1594e
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/rvic
git checkout 077d7c3e65a6e393dc23e6d0e1570969b4b1594e
vim +/nmi_enter +75 arch/arm64/kernel/irq.c

fb9bd7d6df81dd Marc Zyngier    2012-03-05  23  
5870970b9a828d Julien Thierry  2019-01-31  24  /* Only access this in an NMI enter/exit */
5870970b9a828d Julien Thierry  2019-01-31 @25  DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts);
5870970b9a828d Julien Thierry  2019-01-31  26  
f60fe78f133243 Mark Rutland    2017-07-31  27  DEFINE_PER_CPU(unsigned long *, irq_stack_ptr);
132cd887b5c547 AKASHI Takahiro 2015-12-04  28  
e3067861ba6650 Mark Rutland    2017-07-21  29  #ifdef CONFIG_VMAP_STACK
e3067861ba6650 Mark Rutland    2017-07-21  30  static void init_irq_stacks(void)
e3067861ba6650 Mark Rutland    2017-07-21  31  {
e3067861ba6650 Mark Rutland    2017-07-21  32  	int cpu;
e3067861ba6650 Mark Rutland    2017-07-21  33  	unsigned long *p;
e3067861ba6650 Mark Rutland    2017-07-21  34  
e3067861ba6650 Mark Rutland    2017-07-21  35  	for_each_possible_cpu(cpu) {
ed8b20d457d72e James Morse     2018-01-08  36  		p = arch_alloc_vmap_stack(IRQ_STACK_SIZE, cpu_to_node(cpu));
e3067861ba6650 Mark Rutland    2017-07-21  37  		per_cpu(irq_stack_ptr, cpu) = p;
e3067861ba6650 Mark Rutland    2017-07-21  38  	}
e3067861ba6650 Mark Rutland    2017-07-21  39  }
e3067861ba6650 Mark Rutland    2017-07-21  40  #else
e3067861ba6650 Mark Rutland    2017-07-21  41  /* irq stack only needs to be 16 byte aligned - not IRQ_STACK_SIZE aligned. */
e3067861ba6650 Mark Rutland    2017-07-21  42  DEFINE_PER_CPU_ALIGNED(unsigned long [IRQ_STACK_SIZE/sizeof(long)], irq_stack);
e3067861ba6650 Mark Rutland    2017-07-21  43  
f60fe78f133243 Mark Rutland    2017-07-31  44  static void init_irq_stacks(void)
f60fe78f133243 Mark Rutland    2017-07-31  45  {
f60fe78f133243 Mark Rutland    2017-07-31  46  	int cpu;
f60fe78f133243 Mark Rutland    2017-07-31  47  
f60fe78f133243 Mark Rutland    2017-07-31  48  	for_each_possible_cpu(cpu)
f60fe78f133243 Mark Rutland    2017-07-31  49  		per_cpu(irq_stack_ptr, cpu) = per_cpu(irq_stack, cpu);
f60fe78f133243 Mark Rutland    2017-07-31  50  }
e3067861ba6650 Mark Rutland    2017-07-21  51  #endif
f60fe78f133243 Mark Rutland    2017-07-31  52  
fb9bd7d6df81dd Marc Zyngier    2012-03-05 @53  void __init init_IRQ(void)
fb9bd7d6df81dd Marc Zyngier    2012-03-05  54  {
f60fe78f133243 Mark Rutland    2017-07-31  55  	init_irq_stacks();
e851b58cb77b47 Catalin Marinas 2013-01-14  56  	irqchip_init();
fb9bd7d6df81dd Marc Zyngier    2012-03-05  57  	if (!handle_arch_irq)
fb9bd7d6df81dd Marc Zyngier    2012-03-05  58  		panic("No interrupt controller found.");
e1d22385ea6686 Wei Li          2019-06-11  59  
e1d22385ea6686 Wei Li          2019-06-11  60  	if (system_uses_irq_prio_masking()) {
e1d22385ea6686 Wei Li          2019-06-11  61  		/*
e1d22385ea6686 Wei Li          2019-06-11  62  		 * Now that we have a stack for our IRQ handler, set
e1d22385ea6686 Wei Li          2019-06-11  63  		 * the PMR/PSR pair to a consistent state.
e1d22385ea6686 Wei Li          2019-06-11  64  		 */
e1d22385ea6686 Wei Li          2019-06-11  65  		WARN_ON(read_sysreg(daif) & PSR_A_BIT);
e1d22385ea6686 Wei Li          2019-06-11  66  		local_daif_restore(DAIF_PROCCTX_NOIRQ);
e1d22385ea6686 Wei Li          2019-06-11  67  	}
fb9bd7d6df81dd Marc Zyngier    2012-03-05  68  }
17ce302f3117e9 Julien Thierry  2019-06-11  69  
17ce302f3117e9 Julien Thierry  2019-06-11  70  /*
17ce302f3117e9 Julien Thierry  2019-06-11  71   * Stubs to make nmi_enter/exit() code callable from ASM
17ce302f3117e9 Julien Thierry  2019-06-11  72   */
17ce302f3117e9 Julien Thierry  2019-06-11 @73  asmlinkage void notrace asm_nmi_enter(void)
17ce302f3117e9 Julien Thierry  2019-06-11  74  {
17ce302f3117e9 Julien Thierry  2019-06-11 @75  	nmi_enter();
17ce302f3117e9 Julien Thierry  2019-06-11  76  }
17ce302f3117e9 Julien Thierry  2019-06-11  77  NOKPROBE_SYMBOL(asm_nmi_enter);
17ce302f3117e9 Julien Thierry  2019-06-11  78  
17ce302f3117e9 Julien Thierry  2019-06-11 @79  asmlinkage void notrace asm_nmi_exit(void)
17ce302f3117e9 Julien Thierry  2019-06-11  80  {
17ce302f3117e9 Julien Thierry  2019-06-11 @81  	nmi_exit();

:::::: The code at line 75 was first introduced by commit
:::::: 17ce302f3117e9518395847a3120c8a108b587b8 arm64: Fix interrupt tracing in the presence of NMIs

:::::: TO: Julien Thierry <julien.thierry at arm.com>
:::::: CC: Catalin Marinas <catalin.marinas at arm.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33597 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200903/3c938b9a/attachment-0001.gz>


More information about the linux-arm-kernel mailing list