STRUCT SCMI_REGISTERED_EVENTS_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct scmi_registered_events_desc(9) β€” Kernel API Manual πŸ’…

okay so bestie, let me tell you about this struct. It's giving protocol-specific information and it's lowkey iconic. No cap.


✨ NAME ✨

struct scmi_registered_events_desc β€” protocol-specific information. That's the whole vibe. It's literally the place where a protocol's event stuff lives, and we're obsessed.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct scmi_registered_events_desc {
    u8 id;
    const struct scmi_event_ops     *ops;
    struct events_queue             equeue;
    struct scmi_notify_instance     *ni;
    struct scmi_event_header        *eh;
    size_t eh_sz;
    void *in_flight;
    int num_events;
    struct mutex                    registered_mtx;
    const struct scmi_protocol_handle       *ph;
    unsigned long registered_events_handlers[1 << ((
SCMI_REGISTERED_HASH_SZ) - 1)];
    struct scmi_registered_event    *registered_events[];
};

πŸŽ€ Members πŸŽ€

  • id β€” the protocol ID. Like, which protocol even is this? That's what id tells you. No cap.
  • ops β€” protocol-specific and event-related operations. The whole operations situation for this protocol's events.
  • equeue β€” the embedded per-protocol events_queue. It's giving queue, but make it protocol-specific. Slay.
  • ni β€” a reference to the initialized instance descriptor. The notification instance's main character energy.
  • eh β€” a reference to a pre-allocated buffer that the deferred worker uses as a scratch area when fetching data from the kfifo. Lowkey essential for the fetch. iykyk
  • eh_sz β€” the size of that pre-allocated buffer eh. Gotta know how much room you have.
  • in_flight β€” a reference to an in-flight struct scmi_registered_event. It's in the air, it's happening, it's in flight.
  • num_events β€” the number of events in registered_events. Like a headcount but for events.
  • registered_mtx β€” a mutex that protects registered_events_handlers. Lock it down, bestie. πŸ”’
  • ph β€” SCMI protocol handle reference. The whole protocol handle situation.
  • registered_events_handlers β€” a hashtable (yes, the kernel says "hashtable", we respect it) containing all the events' handler descriptors that are registered for this protocol.
  • registered_events β€” a dynamically allocated array holding all the registered events' descriptors. Its fixed size is determined at compile time β€” so like, set in stone before runtime even starts. periodt.

🌸 Description 🌸

All protocols that register at least one event have their protocol-specific information stored here, together with the embedded allocated events_queue. These descriptors are stored in the registered_protocols array at protocol registration time.

And once these descriptors are successfully registered, they are NEVER again removed or modified β€” because protocols do not unregister ever. So once we safely grab a NON-NULL reference from the array, we can keep it and use it. Periodt. That's the whole point. ✨

πŸ‘‘ SEE ALSO πŸ‘‘

Bestie, if you wanna go deeper (and you should, iykyk), check out:

Kernel file ./drivers/firmware/arm_scmi/notify.c, Theory of operation(9), struct scmi_notify_instance(9), struct events_queue(9), struct scmi_event_header(9), struct scmi_registered_event(9), struct scmi_event_handler(9), scmi_lookup_and_call_event_chain(9), scmi_process_event_header(9), scmi_process_event_payload(9), scmi_events_dispatcher(9), scmi_notify(9), scmi_kfifo_free(9), scmi_initialize_events_queue(9), scmi_allocate_registered_events_desc(9), scmi_register_protocol_events(9), scmi_deregister_protocol_events(9), scmi_allocate_event_handler(9), scmi_free_event_handler(9), scmi_bind_event_handler(9), scmi_valid_pending_handler(9), scmi_register_event_handler(9), __scmi_event_handler_get_ops(9), scmi_get_active_handler(9), __scmi_enable_evt(9), scmi_put_handler_unlocked(9), scmi_event_handler_enable_events(9), scmi_notifier_register(9), scmi_notifier_unregister(9), scmi_devm_notifier_register(9), scmi_devm_notifier_unregister(9), scmi_protocols_late_init(9), scmi_notification_init(9), scmi_notification_quiesce(9), scmi_notification_exit(9).


πŸ’– That's the whole page, bestie. Source: ./drivers/firmware/arm_scmi Β· Version: struct scmi_..._events_desc(9) Β· Date: October 2026. Stay slay, and remember: once you grab that NON-NULL reference, you can keep it and use it. periodt. πŸ’–

πŸ“¦ where this page comes from