STRUCT SCMI_VIO_CHANNEL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 associated virtqueue. yes girl, the actual queue. 🧚
  • cinfo β€” the SCMI Tx or Rx channel. this is which channel we're on, periodt.
  • free_lock β€” protects access to the free_list. a whole tiny lock just for that list. πŸ”₯
  • free_list β€” list of unused scmi_vio_msg, and listen: it's maintained for Tx channels only. Rx, you're not invited to this one. πŸ™ˆ
  • pending_lock β€” protects access to the pending_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 for TX deferred replies processing. the main character of the deferral arc. πŸ’€
  • deferred_tx_wq β€” the workqueue for TX deferred replies. where that worker actually lives. 🏠
  • is_rx β€” a bool saying whether the channel is an Rx channel. yes/no, iconic/slay.
  • max_msg β€” maximum number of pending messages for this channel. an unsigned int, so, y'know. capacities. πŸ“¬
  • lock β€” protects access to all members except users, free_list and pending_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_t doing refcount things. πŸ’œ

🌈 SEE ALSO 🌈

go read those, iykyk. πŸ“šβœ¨


ngl bestie, the lock field does not cover users, free_list or pending_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