From: kernel test robot <lkp@intel.com>
To: Himanshu Chauhan <hchauhan@ventanamicro.com>
Cc: oe-kbuild-all@lists.linux.dev, Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_misc_fixes_v1 52/68] arch/riscv/kernel/hw_breakpoint.c:441:22: sparse: sparse: incorrect type in assignment (different base types)
Date: Sat, 8 Feb 2025 15:48:17 +0800 [thread overview]
Message-ID: <202502081559.eVXTEY7M-lkp@intel.com> (raw)
tree: https://github.com/avpatel/linux.git riscv_misc_fixes_v1
head: f0b453b30038af57df379934d55e6b73af29f50f
commit: 0e1dea4868dd2cef4513e65cb9f6bf4314c4f8d9 [52/68] riscv: Introduce support for hardware break/watchpoints
config: riscv-randconfig-r131-20250207 (https://download.01.org/0day-ci/archive/20250208/202502081559.eVXTEY7M-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 6807164500e9920638e2ab0cdb4bf8321d24f8eb)
reproduce: (https://download.01.org/0day-ci/archive/20250208/202502081559.eVXTEY7M-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/202502081559.eVXTEY7M-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 __le64 [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 __le64 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:442:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata2 @@ got restricted __le64 [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 __le64 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:443:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata3 @@ got restricted __le64 [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 __le64 [usertype]
>> arch/riscv/kernel/hw_breakpoint.c:454:15: sparse: sparse: cast to restricted __le64
arch/riscv/kernel/hw_breakpoint.c:558:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata1 @@ got restricted __le64 [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 __le64 [usertype]
arch/riscv/kernel/hw_breakpoint.c:559:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata2 @@ got restricted __le64 [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 __le64 [usertype]
arch/riscv/kernel/hw_breakpoint.c:560:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long tdata3 @@ got restricted __le64 [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 __le64 [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 struct 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 0x%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:[~2025-02-08 7:48 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=202502081559.eVXTEY7M-lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=hchauhan@ventanamicro.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.