mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [atishp04:sstc_v1 14/14] arch/riscv/kvm/vcpu_timer.c:312:48: warning: shift count >= width of type
@ 2022-02-27  8:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-27  8:29 UTC (permalink / raw)
  To: Atish Patra; +Cc: llvm, kbuild-all, Atish Patra, linux-kernel

tree:   https://github.com/atishp04/linux sstc_v1
head:   8904ca0d06f70e6d150b60b72d5ce21044ac9208
commit: 8904ca0d06f70e6d150b60b72d5ce21044ac9208 [14/14] RISC-V: KVM: Support sstc extension
config: riscv-randconfig-c006-20220227 (https://download.01.org/0day-ci/archive/20220227/202202271658.AtS8XIAq-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/atishp04/linux/commit/8904ca0d06f70e6d150b60b72d5ce21044ac9208
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 sstc_v1
        git checkout 8904ca0d06f70e6d150b60b72d5ce21044ac9208
        # 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=riscv SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> arch/riscv/kvm/vcpu_timer.c:312:48: warning: shift count >= width of type [-Wshift-count-overflow]
           csr_write(CSR_VSTIMECMPH, (u32)csr->vstimecmp >> 32);
                                                         ^  ~~
   arch/riscv/include/asm/csr.h:283:38: note: expanded from macro 'csr_write'
           unsigned long __v = (unsigned long)(val);               \
                                               ^~~
   arch/riscv/kvm/vcpu_timer.c:337:45: warning: shift count >= width of type [-Wshift-count-overflow]
           csr->vstimecmp |= csr_read(CSR_VSTIMECMPH) >> 32;
                                                      ^  ~~
   2 warnings generated.


vim +312 arch/riscv/kvm/vcpu_timer.c

   295	
   296	void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)
   297	{
   298		struct kvm_vcpu_timer *vst;
   299		struct kvm_vcpu_csr *csr;
   300	
   301		kvm_riscv_vcpu_update_timedelta(vcpu);
   302	
   303		if (!cpu_sstc_ext_available)
   304			return;
   305	
   306		vst = &vcpu->arch.vstimer;
   307		csr = &vcpu->arch.guest_csr;
   308	#ifdef CONFIG_64BIT
   309		csr_write(CSR_VSTIMECMP, csr->vstimecmp);
   310	#else
   311		csr_write(CSR_VSTIMECMP, (u32)csr->vstimecmp);
 > 312		csr_write(CSR_VSTIMECMPH, (u32)csr->vstimecmp >> 32);
   313	#endif
   314	
   315		/* vstimer should be enabled for the remaining operations */
   316		if (unlikely(!vst->init_done))
   317			return;
   318	
   319		if (kvm_vcpu_is_blocking(vcpu))
   320			kvm_riscv_vcpu_timer_blocking(vcpu);
   321	}
   322	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-27  8:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27  8:29 [atishp04:sstc_v1 14/14] arch/riscv/kvm/vcpu_timer.c:312:48: warning: shift count >= width of type kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®