iosys-map: refactor to reduce struct size

Lucas De Marchi lucas.demarchi at intel.com
Thu May 22 13:59:30 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.

I went through the series and left a few nit comments and things we may
need to fix on top that I only found because of reviewing this.

For the series:

Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

We will probably have quite a few conflicts in drm-xe-next as there are
some changes touching those vmaps, but we can handle those.

Lucas De Marchi

>
>Dave.
>


More information about the dri-devel mailing list