On Sat, May 28, 2022 at 10:40 AM Linus Torvalds torvalds@linux-foundation.org wrote:
So digging a bit deeper - since I have am arm compiler after all - I note that 'sizeof(detailed_timings)' is 88.
Hmm.
sizeof() both
detailed_timings[0].data.other_data.data.range.formula.gtf2
and
detailed_timings[0].data.other_data.data.range.formula.cvt
is 7.
But the *union* of those things is
detailed_timings[0].data.other_data.data.range.formula
and its size is 8 (despite having an alignment of just 1).
The attached patch would seem to fix it for me.
Not very much tested, and I have no idea what it is that triggers this only on spear3xx_defconfig.
Some ARM ABI issue that is triggered by some very particular ARM compiler flag enabled by that config?
Adding some ARM (and SPEAR, and SoC) people in case they have any idea.
This smells like a compiler bug triggered by "there's a 16-bit member field in that gtf2 structure, and despite it being packed and aligned to 1, we somehow still align the size to 2".
I dunno. But marking those unions packed too doesn't seem wrong, and does seem to fix it.
Linus