STRUCT SCMI_SHARED_MEM_OPERATIONS(9)
π 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:
pack_scmi_header(9)unpack_scmi_header(9)struct scmi_chan_info(9)struct scmi_transport_ops(9)struct scmi_desc(9)struct scmi_debug_info(9)struct scmi_shmem_io_ops(9)struct scmi_message_operations(9)struct scmi_transport_core_operations(9)struct scmi_transport_handle(9)struct scmi_transport(9)struct scmi_transport_supplier(9)scmi_transport_supplier_put(9)scmi_transport_supplier_get(9)
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
- 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