From: sashiko-bot@kernel.org
To: "Vikram Singh" <vikram.singh3@oss.qualcomm.com>
Cc: linux-perf-users@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 4/7] riscv: pmu: Add infrastructure for Control Transfer Record
Date: Wed, 25 Nov 2026 08:52:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-232948@kernel.org> (raw)
In-Reply-To: <20261125083942.3695072-5-vikram.singh3@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] riscv: pmu: incompatible event_init() pointer type and ignored
return value
--
commit 15d211fd87e46912144256300103f163e02625b4
Author: Vikram Singh <vikram.singh3@oss.qualcomm.com>
riscv: pmu: Add infrastructure for Control Transfer Record
This commit extends the RISC-V PMU framework with callbacks and data
structures for Control Transfer Record branch stack sampling.
> diff --git a/include/linux/perf/riscv_pmu.h b/include/linux/perf/riscv_pmu.h
> index ecaa40370830a..448e0589875e5 100644
> --- a/include/linux/perf/riscv_pmu.h
> +++ b/include/linux/perf/riscv_pmu.h
[ ... ]
> @@ -60,17 +71,22 @@ struct riscv_pmu {
> int (*ctr_get_idx)(struct perf_event *event);
> int (*ctr_get_width)(int idx);
> void (*ctr_clear_idx)(struct perf_event *event);
> + void (*ctr_add)(struct perf_event *event, int flags);
> + void (*ctr_del)(struct perf_event *event, int flags);
> void (*ctr_start)(struct perf_event *event, u64 init_val);
> void (*ctr_stop)(struct perf_event *event, unsigned long flag);
> int (*event_map)(struct perf_event *event, u64 *config);
> - void (*event_init)(struct perf_event *event);
> + int (*event_init)(struct perf_event *event);
[Severity: High]
Does changing event_init() to return int here break compilation with
CONFIG_RISCV_PMU_SBI enabled?
pmu_sbi_event_init() in drivers/perf/riscv_pmu_sbi.c still returns void
in this patch, so assigning pmu->event_init = pmu_sbi_event_init in
pmu_sbi_device_probe() fails the build under
-Werror=incompatible-pointer-types (breaking bisection until later commit
"riscv: pmu: Integrate CTR Ext support in riscv_pmu_dev driver" updates
pmu_sbi_event_init()).
In addition, riscv_pmu_event_init() in drivers/perf/riscv_pmu.c still
ignores the return value of rvpmu->event_init(event), so errors returned
by the backend callback are silently dropped.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125083942.3695072-1-vikram.singh3@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-11-25 8:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 8:39 [PATCH v6 0/7] riscv: pmu: Add support for Control Transfer Records Ext Vikram Singh
2026-11-25 8:39 ` [PATCH v6 1/7] perf: Increase the maximum number of branches remove_loops() can process Vikram Singh
2026-11-25 8:39 ` [PATCH v6 2/7] riscv: pmu: Add Control transfer records CSR definations Vikram Singh
2026-11-25 8:39 ` [PATCH v6 3/7] riscv: Add Control Transfer Records extension parsing Vikram Singh
2026-11-25 8:39 ` [PATCH v6 4/7] riscv: pmu: Add infrastructure for Control Transfer Record Vikram Singh
2026-11-25 8:52 ` sashiko-bot [this message]
2026-11-25 8:39 ` [PATCH v6 5/7] riscv: pmu: Add driver for Control Transfer Records Ext Vikram Singh
2026-11-25 8:39 ` [PATCH v6 6/7] riscv: pmu: Integrate CTR Ext support in riscv_pmu_dev driver Vikram Singh
2026-11-25 9:01 ` sashiko-bot
2026-11-25 8:39 ` [PATCH v6 7/7] dt-bindings: riscv: add Sxctr ISA extension description Vikram Singh
2026-11-25 8:55 ` sashiko-bot
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=sashiko-outbox-232948@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vikram.singh3@oss.qualcomm.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