mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Atish Patra <atishp@rivosinc.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Atish Patra <Atish.Patra@wdc.com>,
	linux-kernel@vger.kernel.org
Subject: [atishp04:sstc_v1 14/14] arch/riscv/kvm/vcpu_timer.c:312:48: warning: shift count >= width of type
Date: Sun, 27 Feb 2022 16:29:35 +0800	[thread overview]
Message-ID: <202202271658.AtS8XIAq-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-02-27  8:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202202271658.AtS8XIAq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Atish.Patra@wdc.com \
    --cc=atishp@rivosinc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®