STRUCT SCMI_RAW_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 to free_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 to msg_q. two lists, two locks, that's the whole personality πŸ’€
  • wq β€” a waitqueue used to wait and poll on the related msg_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:

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