From: kernel test robot <lkp@intel.com>
To: "João Mário Domingos" <joao.mario@tecnico.ulisboa.pt>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Atish Patra <Atish.Patra@wdc.com>,
linux-kernel@vger.kernel.org, Atish Patra <atishp@rivosinc.com>
Subject: [atishp04:unmatched_pmu 1/4] drivers/perf/riscv_pmu_sbi.c:709:34: warning: shift count >= width of type
Date: Wed, 25 May 2022 00:54:57 +0800 [thread overview]
Message-ID: <202205250058.7LPnhB6e-lkp@intel.com> (raw)
tree: https://github.com/atishp04/linux unmatched_pmu
head: 7b75dbb7c4c01dceb7a974c352945fd86eb88c25
commit: 04bc56e83a7e6e851694e34da95f26c57abc7132 [1/4] RISC-V: Create unique identification for SoC PMU
config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20220525/202205250058.7LPnhB6e-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 10c9ecce9f6096e18222a331c5e7d085bd813f75)
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/04bc56e83a7e6e851694e34da95f26c57abc7132
git remote add atishp04 https://github.com/atishp04/linux
git fetch --no-tags atishp04 unmatched_pmu
git checkout 04bc56e83a7e6e851694e34da95f26c57abc7132
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/perf/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/perf/riscv_pmu_sbi.c:709:34: warning: shift count >= width of type [-Wshift-count-overflow]
pmuid.arch = (sbi_get_marchid() >> (63 - 15) & (1 << 15)) | (sbi_get_marchid() & 0x7FFF);
^ ~~~~~~~~~
1 warning generated.
vim +709 drivers/perf/riscv_pmu_sbi.c
695
696 static uint64_t pmu_sbi_get_pmu_id(void)
697 {
698 union sbi_pmu_id {
699 uint64_t value;
700 struct {
701 uint16_t imp:16;
702 uint16_t arch:16;
703 uint32_t vendor:32;
704 };
705 } pmuid;
706
707 pmuid.value = 0;
708 pmuid.vendor = (uint32_t) sbi_get_mvendorid();
> 709 pmuid.arch = (sbi_get_marchid() >> (63 - 15) & (1 << 15)) | (sbi_get_marchid() & 0x7FFF);
710 pmuid.imp = (sbi_get_mimpid() >> 16);
711
712 return pmuid.value;
713 }
714
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-05-24 16:56 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=202205250058.7LPnhB6e-lkp@intel.com \
--to=lkp@intel.com \
--cc=Atish.Patra@wdc.com \
--cc=atishp@rivosinc.com \
--cc=joao.mario@tecnico.ulisboa.pt \
--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