Re: [PATCH v5 2/4] firmware: arm_sdei: add SDEI_EVENT_SIGNAL support

Kiryl Shutsemau <[email protected]>
Newsgroups org.infradead.lists.kexec,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <akOhHP3Pt7XfzQum@thinkstation>
On Tue, Jun 30, 2026 at 03:51:24AM -0700, Usama Arif wrote:
> On Mon, 29 Jun 2026 16:07:16 +0100 Kiryl Shutsemau <[email protected]> wrote:
> 
> > From: "Kiryl Shutsemau (Meta)" <[email protected]>
> > 
> > Add sdei_event_signal(), a thin wrapper over the SDEI_EVENT_SIGNAL call
> > (DEN0054) that makes the software-signalled event (event 0) pending on a
> > target PE -- delivered NMI-like even when that PE has interrupts masked.
> > It takes no locks, so it is safe to call from NMI / crash context.
> > 
> > Signed-off-by: Kiryl Shutsemau (Meta) <[email protected]>
> > Reviewed-by: Douglas Anderson <[email protected]>
> > ---
> >  drivers/firmware/arm_sdei.c   | 12 ++++++++++++
> >  include/linux/arm_sdei.h      |  6 ++++++
> >  include/uapi/linux/arm_sdei.h |  1 +
> >  3 files changed, 19 insertions(+)
> > 
> > diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
> > index c161cf263547..e8dd2f0f3919 100644
> > --- a/drivers/firmware/arm_sdei.c
> > +++ b/drivers/firmware/arm_sdei.c
> > @@ -339,6 +339,18 @@ static void _ipi_unmask_cpu(void *ignored)
> >  	sdei_unmask_local_cpu();
> >  }
> >  
> > +/*
> > + * Signal the software-signalled event (event 0) to @mpidr. Does nothing
> > + * but the SMC -- no locks, no event lookup -- so it is safe from NMI /
> > + * crash context (e.g. the cross-CPU NMI service).
> > + */
> > +int sdei_event_signal(u32 event_num, u64 mpidr)
> > +{
> > +	return invoke_sdei_fn(SDEI_1_0_FN_SDEI_EVENT_SIGNAL, event_num,
> > +			      mpidr, 0, 0, 0, NULL);
> > +}
> > +NOKPROBE_SYMBOL(sdei_event_signal);
> > +
> 
> Same as patch 1, can this be merged in patch 3? Its good to keep functions
> where they are used.

Patch 3 is big as it is. I don't think folding code that can be a
standalone patch helps the situation.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.