[PATCH v2 05/19] powerpc: interrupt handler wrapper functions

kernel test robot lkp at intel.com
Sat Nov 14 08:52:50 AEDT 2020


Hi Nicholas,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.10-rc3 next-20201113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-interrupt-wrappers/20201111-183954
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r003-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://github.com/0day-ci/linux/commit/36805b0ebcf1760588efad86b8b5db5344329148
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nicholas-Piggin/powerpc-interrupt-wrappers/20201111-183954
        git checkout 36805b0ebcf1760588efad86b8b5db5344329148
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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 >>):

   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:16:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/powerpc/kvm/booke.c:15:
   In file included from include/linux/kvm_host.h:7:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:18:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/powerpc/kvm/booke.c:15:
   In file included from include/linux/kvm_host.h:7:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:20:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/powerpc/kvm/booke.c:15:
   In file included from include/linux/kvm_host.h:7:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:22:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/powerpc/kvm/booke.c:15:
   In file included from include/linux/kvm_host.h:7:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:24:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   arch/powerpc/kvm/booke.c:600:6: warning: no previous prototype for function 'kvmppc_watchdog_func' [-Wmissing-prototypes]
   void kvmppc_watchdog_func(struct timer_list *t)
        ^
   arch/powerpc/kvm/booke.c:600:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void kvmppc_watchdog_func(struct timer_list *t)
   ^
   static 
>> arch/powerpc/kvm/booke.c:922:3: error: implicit declaration of function 'timer_interrupt' [-Werror,-Wimplicit-function-declaration]
                   timer_interrupt(&regs);
                   ^
   arch/powerpc/kvm/booke.c:922:3: note: did you mean 'hrtimer_interrupt'?
   include/linux/hrtimer.h:319:13: note: 'hrtimer_interrupt' declared here
   extern void hrtimer_interrupt(struct clock_event_device *dev);
               ^
>> arch/powerpc/kvm/booke.c:935:3: error: implicit declaration of function 'performance_monitor_exception' [-Werror,-Wimplicit-function-declaration]
                   performance_monitor_exception(&regs);
                   ^
>> arch/powerpc/kvm/booke.c:942:3: error: implicit declaration of function 'unknown_exception' [-Werror,-Wimplicit-function-declaration]
                   unknown_exception(&regs);
                   ^
   arch/powerpc/kvm/booke.c:984:5: warning: no previous prototype for function 'kvmppc_handle_exit' [-Wmissing-prototypes]
   int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr)
       ^
   arch/powerpc/kvm/booke.c:984:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr)
   ^
   static 
   arch/powerpc/kvm/booke.c:1909:6: warning: no previous prototype for function 'kvm_guest_protect_msr' [-Wmissing-prototypes]
   void kvm_guest_protect_msr(struct kvm_vcpu *vcpu, ulong prot_bitmap, bool set)
        ^
   arch/powerpc/kvm/booke.c:1909:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void kvm_guest_protect_msr(struct kvm_vcpu *vcpu, ulong prot_bitmap, bool set)
   ^
   static 
   9 warnings and 3 errors generated.

vim +/timer_interrupt +922 arch/powerpc/kvm/booke.c

4e642ccbd6a3f14 Alexander Graf   2012-02-20  903  
6328e593c3df5e8 Bharat Bhushan   2012-06-20  904  /*
6328e593c3df5e8 Bharat Bhushan   2012-06-20  905   * For interrupts needed to be handled by host interrupt handlers,
6328e593c3df5e8 Bharat Bhushan   2012-06-20  906   * corresponding host handler are called from here in similar way
6328e593c3df5e8 Bharat Bhushan   2012-06-20  907   * (but not exact) as they are called from low level handler
6328e593c3df5e8 Bharat Bhushan   2012-06-20  908   * (such as from arch/powerpc/kernel/head_fsl_booke.S).
6328e593c3df5e8 Bharat Bhushan   2012-06-20  909   */
4e642ccbd6a3f14 Alexander Graf   2012-02-20  910  static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
4e642ccbd6a3f14 Alexander Graf   2012-02-20  911  				     unsigned int exit_nr)
4e642ccbd6a3f14 Alexander Graf   2012-02-20  912  {
4e642ccbd6a3f14 Alexander Graf   2012-02-20  913  	struct pt_regs regs;
73e75b416ffcfa3 Hollis Blanchard 2008-12-02  914  
d30f6e480055e5b Scott Wood       2011-12-20  915  	switch (exit_nr) {
d30f6e480055e5b Scott Wood       2011-12-20  916  	case BOOKE_INTERRUPT_EXTERNAL:
4e642ccbd6a3f14 Alexander Graf   2012-02-20  917  		kvmppc_fill_pt_regs(&regs);
4e642ccbd6a3f14 Alexander Graf   2012-02-20  918  		do_IRQ(&regs);
d30f6e480055e5b Scott Wood       2011-12-20  919  		break;
d30f6e480055e5b Scott Wood       2011-12-20  920  	case BOOKE_INTERRUPT_DECREMENTER:
4e642ccbd6a3f14 Alexander Graf   2012-02-20  921  		kvmppc_fill_pt_regs(&regs);
4e642ccbd6a3f14 Alexander Graf   2012-02-20 @922  		timer_interrupt(&regs);
d30f6e480055e5b Scott Wood       2011-12-20  923  		break;
5f17ce8b954a2ff Tiejun Chen      2013-05-13  924  #if defined(CONFIG_PPC_DOORBELL)
d30f6e480055e5b Scott Wood       2011-12-20  925  	case BOOKE_INTERRUPT_DOORBELL:
4e642ccbd6a3f14 Alexander Graf   2012-02-20  926  		kvmppc_fill_pt_regs(&regs);
4e642ccbd6a3f14 Alexander Graf   2012-02-20  927  		doorbell_exception(&regs);
d30f6e480055e5b Scott Wood       2011-12-20  928  		break;
d30f6e480055e5b Scott Wood       2011-12-20  929  #endif
d30f6e480055e5b Scott Wood       2011-12-20  930  	case BOOKE_INTERRUPT_MACHINE_CHECK:
d30f6e480055e5b Scott Wood       2011-12-20  931  		/* FIXME */
d30f6e480055e5b Scott Wood       2011-12-20  932  		break;
7cc1e8ee78f469e Alexander Graf   2012-02-22  933  	case BOOKE_INTERRUPT_PERFORMANCE_MONITOR:
7cc1e8ee78f469e Alexander Graf   2012-02-22  934  		kvmppc_fill_pt_regs(&regs);
7cc1e8ee78f469e Alexander Graf   2012-02-22 @935  		performance_monitor_exception(&regs);
7cc1e8ee78f469e Alexander Graf   2012-02-22  936  		break;
6328e593c3df5e8 Bharat Bhushan   2012-06-20  937  	case BOOKE_INTERRUPT_WATCHDOG:
6328e593c3df5e8 Bharat Bhushan   2012-06-20  938  		kvmppc_fill_pt_regs(&regs);
6328e593c3df5e8 Bharat Bhushan   2012-06-20  939  #ifdef CONFIG_BOOKE_WDT
6328e593c3df5e8 Bharat Bhushan   2012-06-20  940  		WatchdogException(&regs);
6328e593c3df5e8 Bharat Bhushan   2012-06-20  941  #else
6328e593c3df5e8 Bharat Bhushan   2012-06-20 @942  		unknown_exception(&regs);
6328e593c3df5e8 Bharat Bhushan   2012-06-20  943  #endif
6328e593c3df5e8 Bharat Bhushan   2012-06-20  944  		break;
6328e593c3df5e8 Bharat Bhushan   2012-06-20  945  	case BOOKE_INTERRUPT_CRITICAL:
845ac985cf8e3d5 Tudor Laurentiu  2015-05-18  946  		kvmppc_fill_pt_regs(&regs);
6328e593c3df5e8 Bharat Bhushan   2012-06-20  947  		unknown_exception(&regs);
6328e593c3df5e8 Bharat Bhushan   2012-06-20  948  		break;
ce11e48b7fdd256 Bharat Bhushan   2013-07-04  949  	case BOOKE_INTERRUPT_DEBUG:
ce11e48b7fdd256 Bharat Bhushan   2013-07-04  950  		/* Save DBSR before preemption is enabled */
ce11e48b7fdd256 Bharat Bhushan   2013-07-04  951  		vcpu->arch.dbsr = mfspr(SPRN_DBSR);
ce11e48b7fdd256 Bharat Bhushan   2013-07-04  952  		kvmppc_clear_dbsr();
ce11e48b7fdd256 Bharat Bhushan   2013-07-04  953  		break;
d30f6e480055e5b Scott Wood       2011-12-20  954  	}
4e642ccbd6a3f14 Alexander Graf   2012-02-20  955  }
4e642ccbd6a3f14 Alexander Graf   2012-02-20  956  

---
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: 27196 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20201114/fbd36aa0/attachment-0001.gz>


More information about the Linuxppc-dev mailing list