STRUCT LOGIC_IOMEM_OPS(9)
πΈ struct logic_iomem_ops(9) πΈ
ok so bestie, welcome to the Kernel API Manual π this one's all about struct logic_iomem_ops and it's genuinely a little baddie of a struct β no cap.
β¨ NAME β¨
struct logic_iomem_ops β emulated IO memory ops π like, the whole vibe is "pretend to be IO memory, but make it software."
π¦ SYNOPSIS π¦
struct logic_iomem_ops {
unsigned long (*read)(void *priv, unsigned int offset, int size);
void (*write)(void *priv, unsigned int offset, int size, unsigned
long val);
void (*set)(void *priv, unsigned int offset, u8 value, int size);
void (*copy_from)(void *priv, void *buffer, unsigned int offset, int
size);
void (*copy_to)(void *priv, unsigned int offset, const void *buffer,
int size);
void (*unmap)(void *priv);
};
ok so it's a function-pointer lineup and yes, the line breaks in the middle of unsigned long val and int size are exactly like that in the original β she's quirky like that, we don't question her π
. Copy it character for character if you're using it, fr fr.
π Members π
readβ read an 8, 16, 32 or 64 bit quantity from the given offset, and the size is given in bytes (1, 2, 4 or 8) π₯ also, the 64-bit one is only necessary ifCONFIG_64BITis set, iykyk.writeβ write an 8, 16 32 or 64 bit quantity to the given offset, size given in bytes (1, 2, 4 or 8) β¨ same deal: 64-bit only necessary ifCONFIG_64BITis set.setβ optional, formemset_ioπΈ she's not required, she just shows up when she wants to.copy_fromβ optional, formemcpy_fromioπ«Άcopy_toβ optional, formemcpy_toioπ«Άunmapβ optional, this region is getting unmapped π so like, heads up, this is the goodbye moment.
π SEE ALSO π
- Kernel file
./include/linux/logic_iomem.hstruct logic_iomem_region_ops(9)logic_iomem_add_region(9)
and that's the whole page bestie, you ate that π mwah π
sign-off time: this little love letter lives in ./include/linux, dated October 2026, and it's the struct logic_iomem_ops(9) page β go be iconic with it πβ¨
π¦ 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