STRUCT SCMI_REGISTERED_EVENTS_DESC(9)
π
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 whatidtells you. No cap.opsβ protocol-specific and event-related operations. The whole operations situation for this protocol's events.equeueβ the embedded per-protocolevents_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. iykykeh_szβ the size of that pre-allocated buffereh. Gotta know how much room you have.in_flightβ a reference to an in-flightstruct scmi_registered_event. It's in the air, it's happening, it's in flight.num_eventsβ the number of events inregistered_events. Like a headcount but for events.registered_mtxβ a mutex that protectsregistered_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms