STRUCT LOGIC_IOMEM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 if CONFIG_64BIT is 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 if CONFIG_64BIT is set.
  • set β€” optional, for memset_io 🌸 she's not required, she just shows up when she wants to.
  • copy_from β€” optional, for memcpy_fromio 🫢
  • copy_to β€” optional, for memcpy_toio 🫢
  • unmap β€” optional, this region is getting unmapped πŸ’€ so like, heads up, this is the goodbye moment.

🌈 SEE ALSO 🌈


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