iosys-map: refactor to reduce struct size

Thomas Zimmermann tzimmermann at suse.de
Thu May 22 12:00:20 UTC 2025


cc'ing Lucas, who should also take a look.

Am 22.05.25 um 08:52 schrieb Dave Airlie:
> 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.
>
> Dave.
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list