STRUCT SCMI_VIO_CHANNEL(9)
π struct scmi_vio_channel(9) β the kernel API manual, but make it make sense π
okay so bestie, we're in the struct scmi_vio_channel(9) page of the Kernel API Manual, and honestly? it's giving "backstage pass to the virtio transport." this one's a struct, not a function β so it's literally just a bundle of fields that describe transport channel information. think of it as the group chat every message in a channel passes through. π
β¨ NAME β¨
struct scmi_vio_channel β transport channel information. that's it, that's the vibe. it's the lil data home for one channel. π¦
β¨ SYNOPSIS β¨
struct scmi_vio_channel {
struct virtqueue *vqueue;
struct scmi_chan_info *cinfo;
spinlock_t free_lock;
struct list_head free_list;
spinlock_t pending_lock;
struct list_head pending_cmds_list;
struct work_struct deferred_tx_work;
struct workqueue_struct *deferred_tx_wq;
bool is_rx;
unsigned int max_msg;
spinlock_t lock;
struct completion *shutdown_done;
refcount_t users;
};
like, look at her. twelve fields, zero notes. π
πΈ Members πΈ
here's the field-by-field breakdown, bestie. no skipping, i promise. π
vqueueβ the associatedvirtqueue. yes girl, the actual queue. π§cinfoβ theSCMI TxorRxchannel. this is which channel we're on, periodt.free_lockβ protects access to thefree_list. a whole tiny lock just for that list. π₯free_listβ list of unusedscmi_vio_msg, and listen: it's maintained for Tx channels only. Rx, you're not invited to this one. πpending_lockβ protects access to thepending_cmds_list. same energy, different list.pending_cmds_listβ list of pre-fetched commands queued up for later processing. holding it down until it's their turn. βdeferred_tx_workβ the worker forTXdeferred replies processing. the main character of the deferral arc. πdeferred_tx_wqβ the workqueue forTXdeferred replies. where that worker actually lives. πis_rxβ aboolsaying whether the channel is anRxchannel. yes/no, iconic/slay.max_msgβ maximum number of pending messages for this channel. anunsigned int, so, y'know. capacities. π¬lockβ protects access to all members exceptusers,free_listandpending_cmds_list. read that again. it's the big lock but not the biggest. those three have their own situation going on. β οΈshutdown_doneβ a reference to a completion used when freeing this channel. the "we're done here" signal. π«Άusersβ a reference count to currently active users of this channel.refcount_tdoing refcount things. π
π SEE ALSO π
- Kernel file
./drivers/firmware/arm_scmi/transports/virtio.c Theory of Operation(9)struct scmi_vio_msg(9)virtio_mark_txdone(9)virtio_poll_done(9)
go read those, iykyk. πβ¨
ngl bestie, thelockfield does not coverusers,free_listorpending_cmds_listβ those three have their own locks/refcounts (free_lock,pending_lock). don't come for the big lock for stuff it never promised to protect. π
and that's the page, babe π«Ά source says ./drivers/firmware/arm_scmi/tr... and it's dated October 2026 β written for struct scmi_vio_channel(9), obviously. slay, go ship it. π
ππ
π¦ 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