STRUCT SCMI_RAW_QUEUE(9)
π struct scmi_raw_queue(9) β the kernel API manual, bestie edition π
okay so real talk, this is a page from the Kernel API Manual, and today the main character is struct scmi_raw_queue(9). it's literally the Generic Raw queue descriptor and honestly? she's holding the whole raw-mode operation together. no cap. π
β¨ NAME β¨
struct scmi_raw_queue β the Generic Raw queue descriptor, aka the little struct that keeps your raw buffers and snooped messages in check π¦
πΈ SYNOPSIS πΈ
like, here's the whole vibe, structurally speaking:
struct scmi_raw_queue {
struct list_head free_bufs;
spinlock_t free_bufs_lock;
struct list_head msg_q;
spinlock_t msg_q_lock;
wait_queue_head_t wq;
};
that's it, that's the girl. five members, zero drama (well, unless you forget a lock, then huge drama π). periodt.
π Members π
so let's meet the cast, one by one, because each of them is lowkey essential:
free_bufsβ a freelists listhead that's literally just hanging onto the unused raw buffers for you. think of it as the lil stash where spare buffers chill until they're needed again πfree_bufs_lockβ a spinlock whose entire job is protecting access tofree_bufs. don't touch the freelist without her, fr fr π₯msg_qβ a listhead pointing at a queue of snooped messages waiting to be read out. yes, snooped. yes, they're just sitting there. yes, you're gonna read them eventually πmsg_q_lockβ another spinlock, this one guarding access tomsg_q. two lists, two locks, that's the whole personality πwqβ a waitqueue used to wait and poll on the relatedmsg_q. so when there's nothing to read yet, this is where you hang out and vibe until something shows up β
ngl, the symmetry here is iconic: one list + one lock, twice, plus a waitqueue as a lil garnish. she ate. π
π§ SEE ALSO π§
if you want the full lore, go read the kernel file ./drivers/firmware/arm_scmi/raw_mode.c β that's where all the story lives. and then there's the whole extended friend group:
Theory of operation(9)struct scmi_raw_mode_info(9)struct scmi_xfer_raw_waiter(9)struct scmi_raw_buffer(9)struct scmi_dbg_raw_data(9)scmi_xfer_raw_worker(9)scmi_xfer_raw_get_init(9)scmi_do_xfer_raw_start(9)scmi_raw_message_send(9)scmi_raw_message_receive(9)scmi_raw_mode_init(9)scmi_raw_mode_cleanup(9)scmi_raw_message_report(9)scmi_raw_error_report(9)
go read all of them, bestie, they're all connected iykyk π
and that's the whole page!! π«Ά this one came from ./drivers/firmware/arm_scmi, dated October 2026, and it's struct scmi_raw_queue(9) signing off β stay locked, stay queued, and pls remember the spinlocks πβ¨
π¦ 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