Re: [PATCH v2] drm/imagination: Align rogue_fwif_hwrtdata to 64 bytes
Michal Wilczynski <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.comp.video.dri.devel |
|---|---|
| Message-ID | <[email protected]> |
On 8/8/26 11:27, Alessio Belle wrote: > Hi Michal, > > Did you mean to make any changes to this patch? Because apart from the stub > changelog, everything else seems the same as in v1. Hi Alessio, Yes, the only intended change for v2 was expanding the commit message based on the feedback from v1 [1]. I completely missed replacing the "EDITME" template in the changelog section, sorry. Let me know if you'd like me to send a v3 just to clean up the changelog block, or if you're fine taking it as-is. [1] - https://lore.kernel.org/all/[email protected]/ Best regards, -- Michal Wilczynski <[email protected]> > > Thanks, > Alessio > > On Wed, 2026-08-05 at 21:37 +0200, Michal Wilczynski wrote: >> The build fails on RISC-V using GCC because `SIZE_CHECK(struct >> rogue_fwif_hwrtdata, 384)` expects 384 bytes, but the compiler generates >> a 336-byte structure. >> >> This is due to an alignment conflict: the inner member `cleanup_state` >> requires 64-byte alignment, but the outer struct is explicitly marked >> `__aligned(8)`. >> >> While GCC on ARM64 implicitly pads the size to a multiple of 64, GCC on >> RISC-V strictly respects the 8-byte outer alignment, resulting in a size >> mismatch. >> >> Fix this by aligning the entire structure to 64 bytes, which resolves >> the contradiction and forces the correct 384 byte size on all >> architectures. >> >> Fixes: a26f067feac1 ("drm/imagination: Add FWIF headers") >> Reported-by: kernel test robot <[email protected]> >> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ >> Signed-off-by: Michal Wilczynski <[email protected]> >> --- >> Changes in v2: >> - EDITME: describe what is new in this series revision. >> - EDITME: use bulletpoints and terse descriptions. >> - Link to v1: https://lore.kernel.org/r/[email protected] >> --- >> drivers/gpu/drm/imagination/pvr_rogue_fwif.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/imagination/pvr_rogue_fwif.h b/drivers/gpu/drm/imagination/pvr_rogue_fwif.h >> index 172886be4c820a32ae1b08d62bf0814250f2a9bd..1ba2a167a38b31911e0846923e4dc70626f5ca65 100644 >> --- a/drivers/gpu/drm/imagination/pvr_rogue_fwif.h >> +++ b/drivers/gpu/drm/imagination/pvr_rogue_fwif.h >> @@ -2170,7 +2170,7 @@ struct rogue_fwif_hwrtdata { >> bool geom_caches_need_zeroing __aligned(4); >> >> struct rogue_fwif_cleanup_ctl cleanup_state __aligned(64); >> -} __aligned(8); >> +} __aligned(64); >> >> /* >> ****************************************************************************** >> >> --- >> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 >> change-id: 20251222-fix_imagination-8ef0c94122c4 >> >> Best regards, >