mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3] acpi: fix compilation for 32-bit
@ 2024-08-20 12:40 Ahmad Fatoum
  2024-08-22 10:52 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-08-20 12:40 UTC (permalink / raw)
  To: barebox

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@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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] acpi: fix compilation for 32-bit
  2024-08-20 12:40 [PATCH v3] acpi: fix compilation for 32-bit Ahmad Fatoum
@ 2024-08-22 10:52 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-08-22 10:52 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Tue, 20 Aug 2024 14:40:34 +0200, Ahmad Fatoum wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] acpi: fix compilation for 32-bit
      https://git.pengutronix.de/cgit/barebox/commit/?id=cd20189cd18b (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-22 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-20 12:40 [PATCH v3] acpi: fix compilation for 32-bit Ahmad Fatoum
2024-08-22 10:52 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox