[PATCH 1/3] ratp: Drop wrong alignment annotation

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 7 00:29:53 PDT 2025


When ratp command handling was introduced in ff612b866f301 ("ratp:
implement generic command support") we had an explicit 64bit alignment
for the ratp command array in sandbox. This was removed in 52e5c35671
("X86: lds: remove unnecessary alignments"). With this it can happen
that the ratp command section starts at a non 64bit aligned address, but
the first command in that section will be placed at the first 64bit
boundary. __barebox_ratp_cmd_start will no longer point to the actual
command then and the array iteration fails.

Just drop the wrong alignment annotation.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 include/ratp_bb.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/ratp_bb.h b/include/ratp_bb.h
index 418be6fe7b..c6c7c4bc23 100644
--- a/include/ratp_bb.h
+++ b/include/ratp_bb.h
@@ -57,12 +57,7 @@ struct ratp_command {
 			       int req_len,
 			       struct ratp_bb **rsp,
 			       int *rsp_len);
-}
-#ifdef __x86_64__
-/* This is required because the linker will put symbols on a 64 bit alignment */
-__attribute__((aligned(64)))
-#endif
-;
+};
 
 #define BAREBOX_RATP_CMD_START(_name)							\
 extern const struct ratp_command __barebox_ratp_cmd_##_name;				\

-- 
2.39.5




More information about the barebox mailing list