STRUCT PCC_CHAN_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct pcc_chan_info(9) πŸ‘‘

okay so this is a page straight out of the Kernel API Manual, and bestie, it's literally the whole personality of one PCC channel in a single struct. one (1) channel. that's it. that's the vibe. ✨


🌸 NAME 🌸

struct pcc_chan_info β€” the PCC channel specific information. all the little details that belong to one channel, no sharing, no cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct pcc_chan_info {
    struct pcc_mbox_chan chan;
    struct pcc_chan_reg db;
    struct pcc_chan_reg plat_irq_ack;
    struct pcc_chan_reg cmd_complete;
    struct pcc_chan_reg cmd_update;
    struct pcc_chan_reg error;
    int plat_irq;
    u8 type;
    unsigned int plat_irq_flags;
    bool chan_in_use;
 };

look at her. ten members. every single one iconic. πŸ’…


πŸ’– Members πŸ’–

okay so let's go through the whole cast, one by one, because they all matter:

  • chan β€” the PCC channel information, and yes it comes with the Shared Memory Region info too. the whole package. 🫢
  • db β€” the PCC register bundle for the doorbell register. ring ring, bestie πŸ””
  • plat_irq_ack β€” the PCC register bundle for the platform interrupt acknowledge register. acknowledging, but make it platform. ✨
  • cmd_complete β€” the PCC register bundle for the command complete check register. did it finish? this one knows. πŸ‘€
  • cmd_update β€” the PCC register bundle for the command complete update register. the "update" half of the complete situation. πŸ”₯
  • error β€” the PCC register bundle for the error status register. the one nobody wants a notification from. πŸ’€
  • plat_irq β€” the platform interrupt. just an int. living its simple life. 🌈
  • type β€” the PCC subspace type, chillin' as a u8. ⭐
  • plat_irq_flags β€” the platform interrupt flags. unspecified unsigned int energy. 🧚
  • chan_in_use β€” okay this one's the main character, so listen up: it's a lockless flag, and it's used by type 3 initiator subspaces to filter platform interrupts. only one transfer can occur at a time, BUT the interrupt handler may sample the flag on another CPU β€” so all accesses must use READ_ONCE or WRITE_ONCE. not optional, not a suggestion, literally must. 😭 other subspace types do not test it at all, so if that's you, you can lowkey ignore it. πŸ™ˆ
bestie I'm serious about the READ_ONCE / WRITE_ONCE thing. lockless means the compiler will absolutely betray you if you let it. that's giving undefined behaviour, and undefined behaviour is not the aesthetic we're going for. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, all in the kernel file ./drivers/mailbox/pcc.c:


aaaand that's the page, bestie πŸŽ€ this one comes to you from ./drivers/mailbox, dated October 2026 β€” go forth and don't forget your WRITE_ONCE πŸ’œπŸ¦‹

πŸ“¦ where this page comes from