public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Clément Léger" <cleger@rivosinc.com>
To: Xu Lu <luxu.kernel@bytedance.com>
Cc: "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,
	"Himanshu Chauhan" <hchauhan@ventanamicro.com>,
	"Anup Patel" <apatel@ventanamicro.com>,
	"Atish Patra" <atishp@atishpatra.org>,
	"Björn Töpel" <bjorn@rivosinc.com>,
	"Yunhui Cui" <cuiyunhui@bytedance.com>
Subject: Re: [External] [PATCH v7 2/5] riscv: add support for SBI Supervisor Software Events extension
Date: Mon, 27 Oct 2025 14:29:29 +0100	[thread overview]
Message-ID: <2b4cd5a6-98f8-4ec6-bdac-c6c7dae84049@rivosinc.com> (raw)
In-Reply-To: <CAPYmKFuVC3CwHbytPzQCHOYPoQp2LhucbLRRRRsqHk9upkrW8A@mail.gmail.com>



On 10/27/25 13:00, Xu Lu wrote:
>> +void do_sse(struct sse_event_arch_data *arch_evt, struct pt_regs *regs)
>> +{
>> +       nmi_enter();
>> +
>> +       /* Retrieve missing GPRs from SBI */
>> +       sbi_ecall(SBI_EXT_SSE, SBI_SSE_EVENT_ATTR_READ, arch_evt->evt_id,
>> +                 SBI_SSE_ATTR_INTERRUPTED_A6,
>> +                 (SBI_SSE_ATTR_INTERRUPTED_A7 - SBI_SSE_ATTR_INTERRUPTED_A6) + 1,
>> +                 arch_evt->interrupted_phys, 0, 0);
>> +
>> +       memcpy(&regs->a6, &arch_evt->interrupted, sizeof(arch_evt->interrupted));
>> +
>> +       sse_handle_event(arch_evt, regs);
>> +
>> +       /*
>> +        * The SSE delivery path does not uses the "standard" exception path
>> +        * (see sse_entry.S) and does not process any pending signal/softirqs
>> +        * due to being similar to a NMI.
>> +        * Some drivers (PMU, RAS) enqueue pending work that needs to be handled
>> +        * as soon as possible by bottom halves. For that purpose, set the SIP
>> +        * software interrupt pending bit which will force a software interrupt
>> +        * to be serviced once interrupts are reenabled in the interrupted
>> +        * context if they were masked or directly if unmasked.
>> +        */
>> +       csr_set(CSR_IP, IE_SIE);
> IE_SIE may not always be enabled in CSR_IE(for example when we disable
> CONFIG_ACLINT_SSWI and use imsic for ipi). Maybe we should send ipi to
> the current cpu here.

Hi Xu,

Indeed, that's a good catch. Sending an IPI will be more generic.

Thanks,

Clément

> 
> Best regards,
> Xu Lu



  reply	other threads:[~2025-10-27 13:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 18:17 [PATCH v7 0/5] riscv: add support for SBI Supervisor Software Events Clément Léger
2025-09-08 18:17 ` [PATCH v7 1/5] riscv: add SBI SSE extension definitions Clément Léger
2025-09-08 18:17 ` [PATCH v7 2/5] riscv: add support for SBI Supervisor Software Events extension Clément Léger
2025-10-27 12:00   ` [External] " Xu Lu
2025-10-27 13:29     ` Clément Léger [this message]
2025-09-08 18:17 ` [PATCH v7 3/5] drivers: firmware: add riscv SSE support Clément Léger
2025-10-06  5:38   ` Anup Patel
2025-10-06  6:43     ` Clément Léger
2025-10-27 12:35   ` Himanshu Chauhan
2025-10-29 15:35     ` Clément Léger
2025-10-28  4:51   ` Himanshu Chauhan
2025-10-28  5:29     ` Himanshu Chauhan
2025-09-08 18:17 ` [PATCH v7 4/5] perf: RISC-V: add support for SSE event Clément Léger
2025-09-08 18:17 ` [PATCH v7 5/5] selftests/riscv: add SSE test module Clément Léger
2025-10-10  1:32 ` [PATCH v7 0/5] riscv: add support for SBI Supervisor Software Events Paul Walmsley
2025-10-10  4:29   ` Paul Walmsley
2025-10-13  6:53   ` Clément Léger
2025-10-13  7:10     ` Himanshu Chauhan
2025-10-13 20:29     ` Andrew Jones
2025-10-27  1:47 ` [External] " yunhui cui
2025-10-27  8:25   ` Clément Léger

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=2b4cd5a6-98f8-4ec6-bdac-c6c7dae84049@rivosinc.com \
    --to=cleger@rivosinc.com \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@atishpatra.org \
    --cc=bjorn@rivosinc.com \
    --cc=cuiyunhui@bytedance.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