[PATCH 03/10] firmware: arm_scmi: Allow protocols to register for notifications
Cristian Marussi
cristian.marussi at arm.com
Tue Oct 21 02:37:31 PDT 2025
On Fri, Oct 17, 2025 at 04:10:14PM +0100, Jonathan Cameron wrote:
> On Thu, 25 Sep 2025 21:35:47 +0100
> Cristian Marussi <cristian.marussi at arm.com> wrote:
>
> > Allow protocols themselves to register for their own notifications and
> > providing their own notifier callbacks. While at that, allow for a protocol
> > to register events with compilation-time unknown report/event sizes: such
> > events will use the maximum transport size.
> >
> > Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
> Hi Cristian,
>
Hi,
> A few drive by comments...
>
> > diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
> > index 78e9e27dc9ec..3e623c14745d 100644
> > --- a/drivers/firmware/arm_scmi/notify.c
> > +++ b/drivers/firmware/arm_scmi/notify.c
> > @@ -593,7 +593,12 @@ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id,
> > if (!r_evt)
> > return -EINVAL;
> >
> > - if (len > r_evt->evt->max_payld_sz) {
> > + /* Events with a zero max_payld_sz are sized to be of the maximum
> Local multiline comment syntax seems to be
> /*
> * Events...
Yes of course...
>
> > + * size allowed by the transport: no need to be size-checked here
> > + * since the transport layer would have already dropped such
> > + * over-sized messages.
> > + */
> > + if (r_evt->evt->max_payld_sz && len > r_evt->evt->max_payld_sz) {
>
> > diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h
> > index d62c4469d1fd..2e40a7bb5b01 100644
> > --- a/drivers/firmware/arm_scmi/protocols.h
> > +++ b/drivers/firmware/arm_scmi/protocols.h
> > @@ -161,8 +161,13 @@ struct scmi_proto_helpers_ops;
> > * @dev: A reference to the associated SCMI instance device (handle->dev).
> > * @xops: A reference to a struct holding refs to the core xfer operations that
> > * can be used by the protocol implementation to generate SCMI messages.
> > + * @hops: A reference to a struct holding refs to the common helper operations
> > + * that can be used by the protocol implementation.
>
> @hops isn't added in this patch so either it should be handled in where it was
> added, or if that was missed a precursor patch to this one.
Indeed.
Thanks,
Cristian
More information about the linux-arm-kernel
mailing list