STRUCT SCMI_PROTOCOL_INSTANCE(9)
π struct scmi_protocol_instance β Kernel API Manual, bestie edition π
okay so you're in the Kernel API Manual and the thing on the menu today is struct scmi_protocol_instance, which β say it with me β is literally just a lil container describing an initialized protocol instance β¨. That's the whole vibe. She's initialized, she's got a protocol, she's got a handle. Iconic.
π¦ SYNOPSIS π¦
struct scmi_protocol_instance {
const struct scmi_handle *handle;
const struct scmi_protocol *proto;
void *gid;
refcount_t users;
void *priv;
unsigned int version;
unsigned int negotiated_version;
struct scmi_protocol_handle ph;
};
no cap, that's the whole struct. now let's meet the members one by one, they all have main character energy πΈ
π Members π
handleβ reference to the SCMI handle that's associated with this protocol instance. like, her specific handle. her person. π«Άprotoβ a reference to the protocol descriptor. the blueprint, the origin story, iykyk.gidβ a reference for per-protocol devres management. yes bestie, per-protocol, don't get it twisted.usersβ arefcounttracking the effective users of this protocol. she's counting who's actually using her rn, lowkey.privβ reference for optional protocol private data. optional!! she can have secrets, that's her right πversionβ the protocol version supported by the platform, as detected at runtime. not compile time, runtime. periodt.negotiated_versionβ okay this one's the drama β¨ when the platform supports a newer protocol version, the agent will try to negotiate with the platform about using the newest version it knows about, because backward compatibility is NOT automatically assured (yes, capital N-O-T, the manpage is yelling, respect it π). This field is NON-zero when a successful negotiation has completed. non-zero = it worked, zero = nothing negotiated, fr fr.phβ an embedded protocol handle that gets passed down to protocol initialization code so it can identify this instance. she's embedded. she travels. she identifies. π¦
π Description π
Each protocol gets initialized independently, once for each SCMI platform in which it's defined by DT and implemented by the SCMI server fw. so like, one per platform, no sharing, no borrowing, no "can I copy your homework" β each one does her own thing π
β SEE ALSO β
Kernel file ./drivers/firmware/arm_scmi/driver.c, plus this whole friend group right here:
struct scmi_xfers_info(9)struct scmi_info(9)scmi_create_protocol_devices(9)scmi_xfer_token_set(9)scmi_xfer_token_clear(9)scmi_xfer_inflight_register_unlocked(9)scmi_xfer_inflight_register(9)scmi_xfer_raw_inflight_register(9)scmi_xfer_pending_set(9)scmi_xfer_get(9)scmi_xfer_raw_get(9)scmi_xfer_raw_channel_get(9)__scmi_xfer_put(9)scmi_xfer_raw_put(9)scmi_xfer_lookup_unlocked(9)scmi_bad_message_trace(9)scmi_msg_response_validate(9)scmi_xfer_state_update(9)scmi_xfer_command_acquire(9)scmi_rx_callback(9)xfer_put(9)scmi_wait_for_message_response(9)scmi_xfer_raw_wait_for_message_response(9)do_xfer(9)do_xfer_with_response(9)xfer_get_init(9)version_get(9)scmi_set_protocol_priv(9)scmi_get_protocol_priv(9)scmi_common_extended_name_get(9)scmi_common_get_max_msg_size(9)scmi_protocol_msg_check(9)struct scmi_iterator(9)scmi_revision_area_get(9)scmi_protocol_version_negotiate(9)scmi_protocol_version_initialize(9)scmi_alloc_init_protocol_instance(9)scmi_get_protocol_instance(9)scmi_protocol_acquire(9)scmi_protocol_release(9)scmi_devm_protocol_get(9)scmi_devm_protocol_acquire(9)scmi_devm_protocol_put(9)scmi_is_transport_atomic(9)scmi_handle_get(9)scmi_handle_put(9)scmi_channels_setup(9)
π reminder bestie: that "backward compatibility is NOT automatically assured" line is not me being dramatic, that's the actual caveat. negotiate or perish.
okay that's the whole page, go touch grass π± β this one came from ./drivers/firmware/arm_scmi, dated October 2026, and the header up top is struct scmi...col_instance(9) (yes it's truncated in the header, no we don't know why, the terminal did that, not me π). mwah, bye ππ
π¦ 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