Hi Michal, > On 27 Jan 2025, at 10:45, Michal Orzel <[email protected]> wrote: > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions': > ./include/xen/macros.h:47:31: error: static assertion failed: > "!(alignof(struct membanks) != 8)" > 47 | #define BUILD_BUG_ON(cond) ({ _Static_assert(!(cond), "!(" #cond ")"); > }) > | ^~~~~~~~~~~~~~ > common/device-tree/bootfdt.c:31:5: note: in expansion of macro 'BUILD_BUG_ON' > 31 | BUILD_BUG_ON(alignof(struct membanks) != 8); > > When CONFIG_PHYS_ADDR_T_32 is set, paddr_t is defined as unsigned long, > therefore the struct membanks alignment is 4B. Fix it. > > Fixes: 2209c1e35b47 ("xen/arm: Introduce a generic way to access memory bank > structures") > Signed-off-by: Michal Orzel <[email protected]> > ---
Apart from Julien’s comments for which I’ll leave you both to agree on a solution, I’ve reproduced the issue and tested that your change is fixing it and it’s not breaking a different setup (e.g. 64 bit). Reviewed-by: Luca Fancellu <[email protected]> Tested-by: Luca Fancellu <[email protected]>
