STRUCT IOSYS_MAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct iosys_map(9) β€” like, the Kernel API Manual, but make it fashion πŸ’–

Okay so bestie, listen. This is from the Kernel API Manual (yes, that one), and we're talking about struct iosys_map which is literally the moment when you need a pointer that could be pointing at IO memory or system memory and you're just like "which one is it tho?" It's giving duality. It's giving "I contain multitudes." Periodt.


✨ NAME ✨

struct iosys_map β€” Pointer to IO/system memory 🫢

Like, it's a pointer, but make it ambiguous on purpose (but in a safe way, we love that for us).


🌸 SYNOPSIS 🌸

struct iosys_map {
    union {
      void __iomem *vaddr_iomem;
      void *vaddr;
    };
    bool is_iomem;
 };

No cap, that's the whole vibe right there. An anonymous union and a bool. Simple. Iconic. We stan a compact struct.


πŸŽ€ Members πŸŽ€

  • {unnamed_union} β€” anonymous. Yep, that's it. It's an unnamed union. It has no name. It's mysterious. It's giving main character energy but make it lowkey invisible. πŸ’…
  • vaddr_iomem β€” The buffer's address if it's in I/O memory. So like, this is the version of the pointer you use when the thing lives in IO-space. Don't mix it up with the other one, bestie, I'm begging. πŸ™ˆ
  • vaddr β€” The buffer's address if it's in system memory. This is the regular-memory flavor of the pointer. Same union, different energy. 🌈
  • is_iomem β€” true if the buffer is located in I/O memory, or false otherwise. This is literally the vibe check flag. It tells you which member of the union you should be looking at. Check it before you dereference anything, fr fr. ⭐

πŸ‘‘ SEE ALSO πŸ‘‘

Bestie, there is a whole squad of related functions and macros. Like, a whole friend group. You are not alone in this:

That's the whole group chat. They all ate. πŸ’–


Heads up, bestie: if is_iomem is true, you use vaddr_iomem. If it's false, you use vaddr. Do not get it twisted. The struct is not gonna warn you. You gotta check the flag yourself. It's giving trust fall. 😭

Like, that's the whole page, and honestly? We love a tiny struct with big responsibilities. She's small but she's powerful. She's the moment. πŸ’œ

This has been the Kernel API Manual, struct iosys_map(9) β€” straight from ./include/linux, dated October 2026. Slay, bye! βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from