tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: cf99c505cf7a5b6d3deee91e3571871f20320d31 MIPS: VZ: Only include 
loongson_regs.h for CPU_LOONGSON64
date:   8 months ago
config: mips-randconfig-r033-20210405 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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=cf99c505cf7a5b6d3deee91e3571871f20320d31
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout cf99c505cf7a5b6d3deee91e3571871f20320d31
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=mips 

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

All warnings (new ones prefixed by >>):

   arch/mips/kvm/vz.c: In function '_kvm_vz_restore_htimer':
>> arch/mips/kvm/vz.c:392:10: warning: variable 'freeze_time' set but not used 
>> [-Wunused-but-set-variable]
     392 |  ktime_t freeze_time;
         |          ^~~~~~~~~~~


vim +/freeze_time +392 arch/mips/kvm/vz.c

c992a4f6a9b0a3 James Hogan 2017-03-14  378  
c992a4f6a9b0a3 James Hogan 2017-03-14  379  /**
f4474d50c7d483 James Hogan 2017-03-14  380   * _kvm_vz_restore_htimer() - 
Restore hard timer state.
f4474d50c7d483 James Hogan 2017-03-14  381   * @vcpu:   Virtual CPU.
f4474d50c7d483 James Hogan 2017-03-14  382   * @compare:        CP0_Compare 
register value, restored by caller.
f4474d50c7d483 James Hogan 2017-03-14  383   * @cause:  CP0_Cause register to 
restore.
f4474d50c7d483 James Hogan 2017-03-14  384   *
f4474d50c7d483 James Hogan 2017-03-14  385   * Restore hard timer Guest.Count & 
Guest.Cause taking care to preserve the
f4474d50c7d483 James Hogan 2017-03-14  386   * value of Guest.CP0_Cause.TI 
while restoring Guest.CP0_Cause.
f4474d50c7d483 James Hogan 2017-03-14  387   */
f4474d50c7d483 James Hogan 2017-03-14  388  static void 
_kvm_vz_restore_htimer(struct kvm_vcpu *vcpu,
f4474d50c7d483 James Hogan 2017-03-14  389                                 u32 
compare, u32 cause)
f4474d50c7d483 James Hogan 2017-03-14  390  {
f4474d50c7d483 James Hogan 2017-03-14  391      u32 start_count, after_count;
f4474d50c7d483 James Hogan 2017-03-14 @392      ktime_t freeze_time;
f4474d50c7d483 James Hogan 2017-03-14  393      unsigned long flags;
f4474d50c7d483 James Hogan 2017-03-14  394  
f4474d50c7d483 James Hogan 2017-03-14  395      /*
f4474d50c7d483 James Hogan 2017-03-14  396       * Freeze the soft-timer and 
sync the guest CP0_Count with it. We do
f4474d50c7d483 James Hogan 2017-03-14  397       * this with interrupts 
disabled to avoid latency.
f4474d50c7d483 James Hogan 2017-03-14  398       */
f4474d50c7d483 James Hogan 2017-03-14  399      local_irq_save(flags);
f4474d50c7d483 James Hogan 2017-03-14  400      freeze_time = 
kvm_mips_freeze_hrtimer(vcpu, &start_count);
f4474d50c7d483 James Hogan 2017-03-14  401      write_c0_gtoffset(start_count - 
read_c0_count());
f4474d50c7d483 James Hogan 2017-03-14  402      local_irq_restore(flags);
f4474d50c7d483 James Hogan 2017-03-14  403  
f4474d50c7d483 James Hogan 2017-03-14  404      /* restore guest CP0_Cause, as 
TI may already be set */
f4474d50c7d483 James Hogan 2017-03-14  405      back_to_back_c0_hazard();
f4474d50c7d483 James Hogan 2017-03-14  406      write_gc0_cause(cause);
f4474d50c7d483 James Hogan 2017-03-14  407  
f4474d50c7d483 James Hogan 2017-03-14  408      /*
f4474d50c7d483 James Hogan 2017-03-14  409       * The above sequence isn't 
atomic and would result in lost timer
f4474d50c7d483 James Hogan 2017-03-14  410       * interrupts if we're not 
careful. Detect if a timer interrupt is due
f4474d50c7d483 James Hogan 2017-03-14  411       * and assert it.
f4474d50c7d483 James Hogan 2017-03-14  412       */
f4474d50c7d483 James Hogan 2017-03-14  413      back_to_back_c0_hazard();
f4474d50c7d483 James Hogan 2017-03-14  414      after_count = read_gc0_count();
f4474d50c7d483 James Hogan 2017-03-14  415      if (after_count - start_count > 
compare - start_count - 1)
f4474d50c7d483 James Hogan 2017-03-14  416              kvm_vz_queue_irq(vcpu, 
MIPS_EXC_INT_TIMER);
f4474d50c7d483 James Hogan 2017-03-14  417  }
f4474d50c7d483 James Hogan 2017-03-14  418  

:::::: The code at line 392 was first introduced by commit
:::::: f4474d50c7d483dd4432d5b0891b0bb9ad0eefc9 KVM: MIPS/VZ: Support hardware 
guest timer

:::::: TO: James Hogan <james.ho...@imgtec.com>
:::::: CC: James Hogan <james.ho...@imgtec.com>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to