iosys-map: refactor to reduce struct size

Dave Airlie airlied at gmail.com
Thu May 22 07:13:25 UTC 2025


On Thu, 22 May 2025 at 16:57, Dave Airlie <airlied at gmail.com> 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've put the tree here, and I realised I sent the patches, but when I
rebased onto latest drm-next, there were some new users.

https://github.com/airlied/linux/tree/iosys-map-rewrite

This just fixes up the new drm and sitronix users I found (or missed
earlier). There might still be others around.

Dave.
>
> 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.
>
> Dave.
>


More information about the dri-devel mailing list