From: "Clément Léger" <cleger@rivosinc.com>
To: Qingfang Deng <dqfext@gmail.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Himanshu Chauhan <hchauhan@ventanamicro.com>,
Anup Patel <apatel@ventanamicro.com>,
Xu Lu <luxu.kernel@bytedance.com>,
Atish Patra <atishp@atishpatra.org>,
Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v4 3/4] drivers: firmware: add riscv SSE support
Date: Thu, 22 May 2025 11:55:29 +0200 [thread overview]
Message-ID: <3c8474fb-75fd-4ea1-887a-53f625e4eadf@rivosinc.com> (raw)
In-Reply-To: <20250521074627.4042832-1-dqfext@gmail.com>
On 21/05/2025 09:46, Qingfang Deng wrote:
> Hi Clément,
>
> On Fri, 16 May 2025 17:23:41 +0200, Clément Léger wrote:
>> +static struct sse_event *sse_event_get(u32 evt)
>> +{
>> + struct sse_event *event = NULL, *tmp;
>> +
>> + scoped_guard(spinlock, &events_list_lock) {
>> + list_for_each_entry(tmp, &events, list) {
>> + if (tmp->evt_id == evt)
>> + return event;
>
> `event` is not being updated by the loop and therefore is always NULL.
> Did you mean to return `tmp`?
Hi Qingfang,
Indeed, that's a mistake I made while renaming the evt/event stuff. I
didn't saw that since it is only used to check that we don't register an
event twice. Good catch.
>
>> + }
>> + }
>> +
>> + return NULL;
>> +}
>
> <snip>
>
>> +static int __init sse_init(void)
>> +{
>> + int cpu, ret;
>> +
>> + if (sbi_probe_extension(SBI_EXT_SSE) <= 0) {
>> + pr_err("Missing SBI SSE extension\n");
>> + return -EOPNOTSUPP;
>> + }
>> + pr_info("SBI SSE extension detected\n");
>> +
>> + for_each_possible_cpu(cpu)
>> + INIT_LIST_HEAD(&events);
>
> `events` is already initialized.
Yes indeed,
Thanks,
Clément
>
> Qingfang
prev parent reply other threads:[~2025-05-22 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 15:23 [PATCH v4 0/4] riscv: add support for SBI Supervisor Software Events Clément Léger
2025-05-16 15:23 ` [PATCH v4 1/4] riscv: add SBI SSE extension definitions Clément Léger
2025-05-20 17:38 ` Björn Töpel
2025-05-16 15:23 ` [PATCH v4 2/4] riscv: add support for SBI Supervisor Software Events extension Clément Léger
2025-05-20 18:05 ` Björn Töpel
2025-05-22 9:50 ` Clément Léger
2025-05-16 15:23 ` [PATCH v4 3/4] drivers: firmware: add riscv SSE support Clément Léger
2025-05-20 19:02 ` Björn Töpel
2025-05-23 9:14 ` Clément Léger
2025-05-16 15:23 ` [PATCH v4 4/4] perf: RISC-V: add support for SSE event Clément Léger
2025-05-20 17:37 ` [PATCH v4 0/4] riscv: add support for SBI Supervisor Software Events Björn Töpel
2025-05-21 7:46 ` [PATCH v4 3/4] drivers: firmware: add riscv SSE support Qingfang Deng
2025-05-22 9:55 ` Clément Léger [this message]
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=3c8474fb-75fd-4ea1-887a-53f625e4eadf@rivosinc.com \
--to=cleger@rivosinc.com \
--cc=apatel@ventanamicro.com \
--cc=atishp@atishpatra.org \
--cc=conor.dooley@microchip.com \
--cc=dqfext@gmail.com \
--cc=hchauhan@ventanamicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luxu.kernel@bytedance.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@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®