iosys-map: refactor to reduce struct size

Lucas De Marchi lucas.demarchi at intel.com
Fri Jun 27 17:31:54 UTC 2025


On Thu, May 22, 2025 at 04:52:09PM +1000, Dave Airlie wrote:
>Hey iosys_map users :)
>
>I fell down a bit of a refactor hole today, it was just random and
>sometimes you just have to let these things run their course.
>
>I noticed iosys_map has a 7-byte hole in a 16-byte structure, and
>it gets embedded into a bunch of other structs and it offended my
>sensibilities.
>
>This series makes iosys_map be 8-bytes, using the bottom bit of
>the void * to store the is_iomem.
>
>Patch 1: adds new accessors to start hiding internals
>Patches 2-7: refactor all users in-tree to use new internals
>(hopefully got them all)
>Patch8: moves the internals around to catch anything not in-tree.
>Patch9: reimplements iosys_map as 8-bytes by hiding the is_iomem
>inside the pointer.

Even if not being able to use patch 9, I think there's a value in the
previous patches to hide the internals. Is this something you're going
to re-submit without the last one?

thanks
Lucas De Marchi

>
>Dave.
>


More information about the Intel-xe mailing list