linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
@ 2022-03-19  4:09 kernel test robot
  2022-03-21 17:51 ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-03-19  4:09 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: llvm, kbuild-all, linux-kernel, Peter Zijlstra

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head:   200a79c670d24d4d9a75a6a9cbfd14af2f5d0ad9
commit: 5c9f3806a4400c2957abeea9419547f856457a20 [17/19] lockdep: Fix -Wunused-parameter for _THIS_IP_
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220319/202203191213.tC0sjaY7-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
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/peterz/queue.git/commit/?id=5c9f3806a4400c2957abeea9419547f856457a20
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue locking/core
        git checkout 5c9f3806a4400c2957abeea9419547f856457a20
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from arch/x86/kvm/x86.c:22:
   In file included from arch/x86/kvm/mmu.h:7:
   In file included from arch/x86/kvm/cpuid.h:5:
>> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
           lockdep_hardirqs_on_prepare(CALLER_ADDR0);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
   include/linux/ftrace.h:879:22: note: expanded from macro 'CALLER_ADDR0'
   #define CALLER_ADDR0 ((unsigned long)ftrace_return_address0)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:23:15: note: 'lockdep_hardirqs_on_prepare' declared here
     extern void lockdep_hardirqs_on_prepare(void);
                 ^
   In file included from arch/x86/kvm/x86.c:41:
   include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
      : ((x) & (bit1)) / ((bit1) / (bit2))))
                       ^ ~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.
--
   In file included from arch/x86/kvm/emulate.c:28:
>> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
           lockdep_hardirqs_on_prepare(CALLER_ADDR0);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
   include/linux/ftrace.h:879:22: note: expanded from macro 'CALLER_ADDR0'
   #define CALLER_ADDR0 ((unsigned long)ftrace_return_address0)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:23:15: note: 'lockdep_hardirqs_on_prepare' declared here
     extern void lockdep_hardirqs_on_prepare(void);
                 ^
   1 error generated.


vim +29 arch/x86/kvm/x86.h

65297341d8e15b Uros Bizjak         2021-08-09  12  
bc908e091b3264 Sean Christopherson 2021-05-04  13  static __always_inline void kvm_guest_enter_irqoff(void)
bc908e091b3264 Sean Christopherson 2021-05-04  14  {
bc908e091b3264 Sean Christopherson 2021-05-04  15  	/*
bc908e091b3264 Sean Christopherson 2021-05-04  16  	 * VMENTER enables interrupts (host state), but the kernel state is
bc908e091b3264 Sean Christopherson 2021-05-04  17  	 * interrupts disabled when this is invoked. Also tell RCU about
bc908e091b3264 Sean Christopherson 2021-05-04  18  	 * it. This is the same logic as for exit_to_user_mode().
bc908e091b3264 Sean Christopherson 2021-05-04  19  	 *
bc908e091b3264 Sean Christopherson 2021-05-04  20  	 * This ensures that e.g. latency analysis on the host observes
bc908e091b3264 Sean Christopherson 2021-05-04  21  	 * guest mode as interrupt enabled.
bc908e091b3264 Sean Christopherson 2021-05-04  22  	 *
bc908e091b3264 Sean Christopherson 2021-05-04  23  	 * guest_enter_irqoff() informs context tracking about the
bc908e091b3264 Sean Christopherson 2021-05-04  24  	 * transition to guest mode and if enabled adjusts RCU state
bc908e091b3264 Sean Christopherson 2021-05-04  25  	 * accordingly.
bc908e091b3264 Sean Christopherson 2021-05-04  26  	 */
bc908e091b3264 Sean Christopherson 2021-05-04  27  	instrumentation_begin();
bc908e091b3264 Sean Christopherson 2021-05-04  28  	trace_hardirqs_on_prepare();
bc908e091b3264 Sean Christopherson 2021-05-04 @29  	lockdep_hardirqs_on_prepare(CALLER_ADDR0);
bc908e091b3264 Sean Christopherson 2021-05-04  30  	instrumentation_end();
bc908e091b3264 Sean Christopherson 2021-05-04  31  
bc908e091b3264 Sean Christopherson 2021-05-04  32  	guest_enter_irqoff();
bc908e091b3264 Sean Christopherson 2021-05-04  33  	lockdep_hardirqs_on(CALLER_ADDR0);
bc908e091b3264 Sean Christopherson 2021-05-04  34  }
bc908e091b3264 Sean Christopherson 2021-05-04  35  

:::::: The code at line 29 was first introduced by commit
:::::: bc908e091b3264672889162733020048901021fb KVM: x86: Consolidate guest enter/exit logic to common helpers

:::::: TO: Sean Christopherson <seanjc@google.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
  2022-03-19  4:09 [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1 kernel test robot
@ 2022-03-21 17:51 ` Nick Desaulniers
  2022-03-21 21:14   ` Peter Zijlstra
  2022-03-23 14:45   ` Peter Zijlstra
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Desaulniers @ 2022-03-21 17:51 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: llvm, kbuild-all, linux-kernel, kernel test robot, Mark Rutland

On Fri, Mar 18, 2022 at 9:10 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> head:   200a79c670d24d4d9a75a6a9cbfd14af2f5d0ad9
> commit: 5c9f3806a4400c2957abeea9419547f856457a20 [17/19] lockdep: Fix -Wunused-parameter for _THIS_IP_
> config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220319/202203191213.tC0sjaY7-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
> 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/peterz/queue.git/commit/?id=5c9f3806a4400c2957abeea9419547f856457a20
>         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
>         git fetch --no-tags peterz-queue locking/core
>         git checkout 5c9f3806a4400c2957abeea9419547f856457a20
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    In file included from arch/x86/kvm/x86.c:22:
>    In file included from arch/x86/kvm/mmu.h:7:
>    In file included from arch/x86/kvm/cpuid.h:5:
> >> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
>            lockdep_hardirqs_on_prepare(CALLER_ADDR0);
>            ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~

Peter, I think you dropped the hunk to include/linux/kvm_host.h when
applying this patch?

Compare:
https://lore.kernel.org/lkml/20220314221909.2027027-1-ndesaulniers@google.com/
vs
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/patch/?id=1923a1429507b15b2061968614a6943365159738

>    include/linux/ftrace.h:879:22: note: expanded from macro 'CALLER_ADDR0'
>    #define CALLER_ADDR0 ((unsigned long)ftrace_return_address0)
>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/irqflags.h:23:15: note: 'lockdep_hardirqs_on_prepare' declared here
>      extern void lockdep_hardirqs_on_prepare(void);
>                  ^
>    In file included from arch/x86/kvm/x86.c:41:
>    include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
>                   _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
>                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
>       : ((x) & (bit1)) / ((bit1) / (bit2))))
>                        ^ ~~~~~~~~~~~~~~~~~
>    1 warning and 1 error generated.
> --
>    In file included from arch/x86/kvm/emulate.c:28:
> >> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
>            lockdep_hardirqs_on_prepare(CALLER_ADDR0);
>            ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
>    include/linux/ftrace.h:879:22: note: expanded from macro 'CALLER_ADDR0'
>    #define CALLER_ADDR0 ((unsigned long)ftrace_return_address0)
>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/irqflags.h:23:15: note: 'lockdep_hardirqs_on_prepare' declared here
>      extern void lockdep_hardirqs_on_prepare(void);
>                  ^
>    1 error generated.
>
>
> vim +29 arch/x86/kvm/x86.h
>
> 65297341d8e15b Uros Bizjak         2021-08-09  12
> bc908e091b3264 Sean Christopherson 2021-05-04  13  static __always_inline void kvm_guest_enter_irqoff(void)
> bc908e091b3264 Sean Christopherson 2021-05-04  14  {
> bc908e091b3264 Sean Christopherson 2021-05-04  15       /*
> bc908e091b3264 Sean Christopherson 2021-05-04  16        * VMENTER enables interrupts (host state), but the kernel state is
> bc908e091b3264 Sean Christopherson 2021-05-04  17        * interrupts disabled when this is invoked. Also tell RCU about
> bc908e091b3264 Sean Christopherson 2021-05-04  18        * it. This is the same logic as for exit_to_user_mode().
> bc908e091b3264 Sean Christopherson 2021-05-04  19        *
> bc908e091b3264 Sean Christopherson 2021-05-04  20        * This ensures that e.g. latency analysis on the host observes
> bc908e091b3264 Sean Christopherson 2021-05-04  21        * guest mode as interrupt enabled.
> bc908e091b3264 Sean Christopherson 2021-05-04  22        *
> bc908e091b3264 Sean Christopherson 2021-05-04  23        * guest_enter_irqoff() informs context tracking about the
> bc908e091b3264 Sean Christopherson 2021-05-04  24        * transition to guest mode and if enabled adjusts RCU state
> bc908e091b3264 Sean Christopherson 2021-05-04  25        * accordingly.
> bc908e091b3264 Sean Christopherson 2021-05-04  26        */
> bc908e091b3264 Sean Christopherson 2021-05-04  27       instrumentation_begin();
> bc908e091b3264 Sean Christopherson 2021-05-04  28       trace_hardirqs_on_prepare();
> bc908e091b3264 Sean Christopherson 2021-05-04 @29       lockdep_hardirqs_on_prepare(CALLER_ADDR0);
> bc908e091b3264 Sean Christopherson 2021-05-04  30       instrumentation_end();
> bc908e091b3264 Sean Christopherson 2021-05-04  31
> bc908e091b3264 Sean Christopherson 2021-05-04  32       guest_enter_irqoff();
> bc908e091b3264 Sean Christopherson 2021-05-04  33       lockdep_hardirqs_on(CALLER_ADDR0);
> bc908e091b3264 Sean Christopherson 2021-05-04  34  }
> bc908e091b3264 Sean Christopherson 2021-05-04  35
>
> :::::: The code at line 29 was first introduced by commit
> :::::: bc908e091b3264672889162733020048901021fb KVM: x86: Consolidate guest enter/exit logic to common helpers
>
> :::::: TO: Sean Christopherson <seanjc@google.com>
> :::::: CC: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> 0-DAY CI Kernel Test Service
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
  2022-03-21 17:51 ` Nick Desaulniers
@ 2022-03-21 21:14   ` Peter Zijlstra
  2022-03-23 14:45   ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2022-03-21 21:14 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: llvm, kbuild-all, linux-kernel, kernel test robot, Mark Rutland

On Mon, Mar 21, 2022 at 10:51:29AM -0700, Nick Desaulniers wrote:
> On Fri, Mar 18, 2022 at 9:10 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> > head:   200a79c670d24d4d9a75a6a9cbfd14af2f5d0ad9
> > commit: 5c9f3806a4400c2957abeea9419547f856457a20 [17/19] lockdep: Fix -Wunused-parameter for _THIS_IP_
> > config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220319/202203191213.tC0sjaY7-lkp@intel.com/config)
> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
> > 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/peterz/queue.git/commit/?id=5c9f3806a4400c2957abeea9419547f856457a20
> >         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
> >         git fetch --no-tags peterz-queue locking/core
> >         git checkout 5c9f3806a4400c2957abeea9419547f856457a20
> >         # save the config file to linux build tree
> >         mkdir build_dir
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from arch/x86/kvm/x86.c:22:
> >    In file included from arch/x86/kvm/mmu.h:7:
> >    In file included from arch/x86/kvm/cpuid.h:5:
> > >> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
> >            lockdep_hardirqs_on_prepare(CALLER_ADDR0);
> >            ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
> 
> Peter, I think you dropped the hunk to include/linux/kvm_host.h when
> applying this patch?

Could be I fat fingered some conflict, I'll try again.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
  2022-03-21 17:51 ` Nick Desaulniers
  2022-03-21 21:14   ` Peter Zijlstra
@ 2022-03-23 14:45   ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2022-03-23 14:45 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: llvm, kbuild-all, linux-kernel, kernel test robot, Mark Rutland

On Mon, Mar 21, 2022 at 10:51:29AM -0700, Nick Desaulniers wrote:
> On Fri, Mar 18, 2022 at 9:10 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> > head:   200a79c670d24d4d9a75a6a9cbfd14af2f5d0ad9
> > commit: 5c9f3806a4400c2957abeea9419547f856457a20 [17/19] lockdep: Fix -Wunused-parameter for _THIS_IP_
> > config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220319/202203191213.tC0sjaY7-lkp@intel.com/config)
> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
> > 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/peterz/queue.git/commit/?id=5c9f3806a4400c2957abeea9419547f856457a20
> >         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
> >         git fetch --no-tags peterz-queue locking/core
> >         git checkout 5c9f3806a4400c2957abeea9419547f856457a20
> >         # save the config file to linux build tree
> >         mkdir build_dir
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from arch/x86/kvm/x86.c:22:
> >    In file included from arch/x86/kvm/mmu.h:7:
> >    In file included from arch/x86/kvm/cpuid.h:5:
> > >> arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1
> >            lockdep_hardirqs_on_prepare(CALLER_ADDR0);
> >            ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
> 
> Peter, I think you dropped the hunk to include/linux/kvm_host.h when
> applying this patch?
> 

Someone moved that function to arch/x86/kvm/x86.h which is why it went
sideways when I resolved it. Should hopefully be fixed now, lemme go do
a few builds before I push out.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-23 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19  4:09 [peterz-queue:locking/core 17/19] arch/x86/kvm/x86.h:29:30: error: too many arguments to function call, expected 0, have 1 kernel test robot
2022-03-21 17:51 ` Nick Desaulniers
2022-03-21 21:14   ` Peter Zijlstra
2022-03-23 14:45   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).