[PATCH v3] acpi: fix compilation for 32-bit
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Aug 20 05:40:34 PDT 2024
Build test on 32-bit failed because of forcing the bigger alignment on
the flexible array.
Removing the alignment in turn broke the CI tests for 64-bit, so
let's go back to using a packed struct, but have the alignment follow
the size of the pointer.
Fixes: 4fa3b9d2b64b ("acpi: fix compilation for 32-bit")
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
v2 -> v3:
- make commit apply on top of v1, which has already been applied.
v1 -> v2:
- fix CI x86_64 breakage, by keeping the packed/aligned specifiction
as is, but changing it to 32-bit on 32-bit systems.
---
include/acpi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/acpi.h b/include/acpi.h
index 837476424664..fc0da30610a6 100644
--- a/include/acpi.h
+++ b/include/acpi.h
@@ -113,9 +113,9 @@ struct __packed acpi_sdt { /* system description table header */
u32 creator_revision;
};
-struct acpi_rsdt { /* system description table header */
+struct __packed acpi_rsdt { /* system description table header */
struct acpi_sdt sdt;
- struct acpi_sdt *entries[];
+ struct acpi_sdt *__aligned(sizeof(void *)) entries[];
};
struct acpi_driver {
--
2.39.2
More information about the barebox
mailing list