iosys_map_wr_field(9)
π« iosys_map_wr_field(9) π«
okay so bestie, welcome to the Kernel API Manual β this little cutie lives in section 9 of the kernel man pages, and today we're talking about iosys_map_wr_field. it's giving "write one field, but make it architecture-aware" and honestly? iconic. π
πΈ NAME πΈ
iosys_map_wr_field β write to a member of a struct in the iosys_map π
β¨ SYNOPSIS β¨
iosys_map_wr_field (map__ , struct_offset__ , struct_type__ , field__ ,
val__ );
π¦ ARGUMENTS π¦
map__β theiosys_mapstructure itself. the main character, the map we're messing with πstruct_offset__β offset from the beginning of the map, like, where the struct is actually located. yes you have to tell it πstruct_type__β the struct that describes the layout of the mapping. it's the blueprint, the vibe reference π§field__β member of the struct to read π (that's what the page says, bestie, I'm just relaying it)val__β the value to write. the payload. the moment. β
π₯ DESCRIPTION π₯
so the whole point: this writes a value into the iosys_map, and it figures everything out by treating the layout as being described by a C struct that starts at struct_offset__. it calculates the field offset and size, then writes val__ in there. slay. π
β οΈ but listen β if that field access would end up being an un-aligned access, then you either gotta use iosys_map_memcpy_to, or your architecture has to actually support unaligned access. no cap, don't skip this part. π
for expected usage and memory layout, go check out iosys_map_rd_field β that's the reference, fr fr. π«Ά
π SEE ALSO π
- Kernel file
./include/linux/iosys-map.h overview(9)struct iosys_map(9)IOSYS_MAP_INIT_VADDR(9)IOSYS_MAP_INIT_VADDR_IOMEM(9)IOSYS_MAP_INIT_OFFSET(9)iosys_map_set_vaddr(9)iosys_map_set_vaddr_iomem(9)iosys_map_is_equal(9)iosys_map_is_null(9)iosys_map_is_set(9)iosys_map_clear(9)iosys_map_memcpy_to(9)iosys_map_memcpy_from(9)iosys_map_incr(9)iosys_map_memset(9)iosys_map_rd(9)iosys_map_wr(9)iosys_map_rd_field(9)
and that's the whole page, bestie! π this one came from ./include/linux, dated October 2026, and it's filed under iosys_map_wr_field(9). go write some fields, but like... aligned ones. mwah πβ¨
π¦ 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