From: kernel test robot <lkp@intel.com>
To: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev, Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_sbi_dbtr_v3 63/64] arch/riscv/kernel/hw_breakpoint.c:441:22: sparse: sparse: incorrect type in assignment (different base types)
Date: Thu, 02 Jul 2026 03:00:25 +0800 [thread overview]
Message-ID: <202607020239.MsmfbLpY-lkp@intel.com> (raw)
tree: https://github.com/avpatel/linux.git riscv_sbi_dbtr_v3
head: dc427f45c78ef4a4158898a13df1e1119af95be3
commit: b85d9f545481fd4c956f5bc45ec5c6e2cb3d72ab [63/64] riscv: Introduce support for hardware break/watchpoints
config: riscv-randconfig-r134-20260701 (https://download.01.org/0day-ci/archive/20260702/202607020239.MsmfbLpY-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 6cc609bb250b21b47fc7d394b4019101e9983597)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260702/202607020239.MsmfbLpY-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607020239.MsmfbLpY-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zacas_zabha'
>> arch/riscv/kernel/hw_breakpoint.c:441:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata1 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:441:22: sparse: expected unsigned long tdata1
arch/riscv/kernel/hw_breakpoint.c:441:22: sparse: got restricted __le32 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:442:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata2 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:442:22: sparse: expected unsigned long tdata2
arch/riscv/kernel/hw_breakpoint.c:442:22: sparse: got restricted __le32 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:443:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata3 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:443:22: sparse: expected unsigned long tdata3
arch/riscv/kernel/hw_breakpoint.c:443:22: sparse: got restricted __le32 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:454:15: sparse: sparse: cast to restricted __le32
arch/riscv/kernel/hw_breakpoint.c:558:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata1 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:558:22: sparse: expected unsigned long tdata1
arch/riscv/kernel/hw_breakpoint.c:558:22: sparse: got restricted __le32 [usertype]
arch/riscv/kernel/hw_breakpoint.c:559:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata2 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:559:22: sparse: expected unsigned long tdata2
arch/riscv/kernel/hw_breakpoint.c:559:22: sparse: got restricted __le32 [usertype]
arch/riscv/kernel/hw_breakpoint.c:560:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata3 @@ got restricted __le32 [usertype] @@
arch/riscv/kernel/hw_breakpoint.c:560:22: sparse: expected unsigned long tdata3
arch/riscv/kernel/hw_breakpoint.c:560:22: sparse: got restricted __le32 [usertype]
vim +441 arch/riscv/kernel/hw_breakpoint.c
423
424 /* atomic: counter->ctx->lock is held */
425 int arch_install_hw_breakpoint(struct perf_event *event)
426 {
427 struct arch_hw_breakpoint *bp = counter_arch_bp(event);
428 union sbi_dbtr_shmem_entry *shmem = this_cpu_ptr(sbi_dbtr_shmem);
429 struct sbi_dbtr_data_msg *xmit;
430 struct sbi_dbtr_id_msg *recv;
431 struct perf_event **slot;
432 unsigned long idx;
433 struct sbiret ret;
434 int err = 0;
435
436 raw_spin_lock_irqsave(this_cpu_ptr(&ecall_lock),
437 *this_cpu_ptr(&ecall_lock_flags));
438
439 xmit = &shmem->data;
440 recv = &shmem->id;
> 441 xmit->tdata1 = cpu_to_le(bp->tdata1);
> 442 xmit->tdata2 = cpu_to_le(bp->tdata2);
> 443 xmit->tdata3 = cpu_to_le(bp->tdata3);
444
445 ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_TRIG_INSTALL,
446 1, 0, 0, 0, 0, 0);
447
448 if (ret.error) {
449 pr_warn("%s: failed to install trigger\n", __func__);
450 err = -EIO;
451 goto done;
452 }
453
> 454 idx = le_to_cpu(recv->idx);
455 if (idx >= dbtr_total_num) {
456 pr_warn("%s: invalid trigger index %lu\n", __func__, idx);
457 err = -EINVAL;
458 goto done;
459 }
460
461 slot = this_cpu_ptr(&pcpu_hw_bp_events[idx]);
462 if (*slot) {
463 pr_warn("%s: slot %lu is in use\n", __func__, idx);
464 err = -EBUSY;
465 goto done;
466 }
467
468 pr_debug("Trigger %lu installed at index 0x%lx\n", bp->tdata2, idx);
469
470 /* Save the event - to be looked up in handler */
471 *slot = event;
472
473 done:
474 raw_spin_unlock_irqrestore(this_cpu_ptr(&ecall_lock),
475 *this_cpu_ptr(&ecall_lock_flags));
476 return err;
477 }
478
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-01 19:00 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=202607020239.MsmfbLpY-lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=himanshu.chauhan@oss.qualcomm.com \
--cc=oe-kbuild-all@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.