lkml.org 
[lkml]   [2022]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[atishp04:sstc_v1 14/14] arch/riscv/kvm/vcpu_timer.c:312:48: warning: shift count >= width of type
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

\
 
 \ /
  Last update: 2022-02-27 09:31    [W:0.031 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site