mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Chiu <tchiu@tenstorrent.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Anup Patel <anup@brainfault.org>,
	"Yong-Xuan Wang" <yongxuan.wang@sifive.com>
Subject: arch/riscv/kernel/kernel_mode_vector.c:27:13: sparse: sparse: cast removes address space '__rcu' of expression
Date: Fri, 25 Sep 2026 18:25:46 +0800	[thread overview]
Message-ID: <202609251807.X3jcxqyP-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5fc5768c7ca92895ccd1de94dc521e5a55ae7896
commit: b5060a4aa33d7d78a8c1837ab08ef0c81ea96650 RISC-V: KVM: fix vcpu vector context handling for kernel-mode vector
date:   6 weeks ago
config: riscv-randconfig-r1309-20260925 (https://download.01.org/0day-ci/archive/20260925/202609251807.X3jcxqyP-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6e714c8d91116794cb699cdf80c26afe9cda3ef3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260925/202609251807.X3jcxqyP-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: b5060a4aa33d ("RISC-V: KVM: fix vcpu vector context handling for kernel-mode vector")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609251807.X3jcxqyP-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   WARNING: invalid argument to '-march': '_zacas_zabha'
>> arch/riscv/kernel/kernel_mode_vector.c:27:13: sparse: sparse: cast removes address space '__rcu' of expression
   arch/riscv/kernel/kernel_mode_vector.c:27:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
   arch/riscv/kernel/kernel_mode_vector.c:27:13: sparse:    void ( [noderef] __rcu * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:27:13: sparse:    void ( * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:30:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   arch/riscv/kernel/kernel_mode_vector.c:30:9: sparse:    void ( [noderef] __rcu * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:30:9: sparse:    void ( * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:36:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   arch/riscv/kernel/kernel_mode_vector.c:36:9: sparse:    void ( [noderef] __rcu * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:36:9: sparse:    void ( * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:111:41: sparse: sparse: cast removes address space '__rcu' of expression
   arch/riscv/kernel/kernel_mode_vector.c:111:41: sparse: sparse: incompatible types in comparison expression (different address spaces):
   arch/riscv/kernel/kernel_mode_vector.c:111:41: sparse:    void ( [noderef] __rcu * )( ... )
   arch/riscv/kernel/kernel_mode_vector.c:111:41: sparse:    void ( * )( ... )

vim +/__rcu +27 arch/riscv/kernel/kernel_mode_vector.c

    24	
    25	void kvm_riscv_register_vctx_callback(void (*func)(void))
    26	{
  > 27		if (WARN_ON_ONCE(rcu_access_pointer(kvm_flush_vector_ctx_callback)))
    28			return;
    29	
    30		rcu_assign_pointer(kvm_flush_vector_ctx_callback, func);
    31	}
    32	EXPORT_SYMBOL_GPL(kvm_riscv_register_vctx_callback);
    33	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-09-25 10:26 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=202609251807.X3jcxqyP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup@brainfault.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tchiu@tenstorrent.com \
    --cc=yongxuan.wang@sifive.com \
    /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®