STRUCT SCMI_SHARED_MEM_OPERATIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct scmi_shared_mem_operations(9) β€” Kernel API Manual, bestie edition ✨

okay so picture this: it's a struct from the Kernel API Manual, and it is literally the transport core operations for Shared Memory. That's the whole NAME situation. It's the little bundle of function pointers that lets the SCMI transport core talk to shared memory without caring which flavour of shmem it's staring at. Iconic behavior, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct scmi_shared_mem_operations {
    void (*tx_prepare)(struct scmi_shared_mem __iomem *shmem, struct scmi_xfer *xfer, struct scmi_chan_info *cinfo, shmem_copy_toio_t toio);
    u32 (*read_header)(struct scmi_shared_mem __iomem *shmem);
    void (*fetch_response)(struct scmi_shared_mem __iomem *shmem, struct scmi_xfer *xfer, shmem_copy_fromio_t fromio);
    void (*fetch_notification)(struct scmi_shared_mem __iomem *shmem, size_t max_len, struct scmi_xfer *xfer, shmem_copy_fromio_t fromio);
    void (*clear_channel)(struct scmi_shared_mem __iomem *shmem);
    bool (*poll_done)(struct scmi_shared_mem __iomem *shmem, struct scmi_xfer *xfer);
    bool (*channel_free)(struct scmi_shared_mem __iomem *shmem);
    bool (*channel_intr_enabled)(struct scmi_shared_mem __iomem *shmem);
    void __iomem *(*setup_iomap)(struct scmi_chan_info *cinfo, struct device *dev, bool tx, struct resource *res, struct scmi_shmem_io_ops **ops);
};

look at her. nine function pointers, all vibing in one struct. main character energy fr fr 🌈


πŸ‘‘ Members πŸ‘‘

  • tx_prepare β€” gets the xfer message all dressed up and ready to be transmitted on the shmem you picked. glow-up complete πŸ’–
  • read_header β€” peeks at the header of the message that's currently held in shmem. just a lil look, not a read of the whole thing ✨
  • fetch_response β€” copies the message response out of shmem and into xfer. delivering the goods 🫢
  • fetch_notification β€” same idea but for the message notification: copies it from shmem into xfer. not me obsessing over notifications πŸ””
  • clear_channel β€” clears the shmem channel busy flag. freeing her from her busy era πŸ’…
  • poll_done β€” checks whether the poll has completed for xfer on shmem. are we there yet? are we there yet? 😭
  • channel_free β€” checks whether the shmem channel is marked as free. vibe check on the channel πŸ¦‹
  • channel_intr_enabled β€” checks whether the shmem channel has requested a completion irq. yes, it's the "is she on interrupt mode" check ⭐
  • setup_iomap β€” sets up the IO shared memory for channel cinfo. the whole point of the function pointer, honestly 🌸
real talk: these are function pointers, so the actual behaviour lives wherever they're wired up. this page is just the shape of the slot they go in, bestie 🧚

🌟 SEE ALSO 🌟

Kernel file ./drivers/firmware/arm_scmi/common.h, plus the whole friend group:


that's the whole page, bestie β€” you ate that πŸ’œ okurrr, mwah, bye! πŸ“

source: ./drivers/firmware/arm_scmi Β· date: October 2026 Β· version/manual: Kernel API Manual Β· yes you read all of it, i'm so proud of you πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from