[PATCH 5/5] ARM64: cache: use WEAK() for v8_flush_l3_cache stub

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Sep 4 00:59:17 PDT 2026


From: Ahmad Fatoum <a.fatoum at barebox.org>

clang's integrated assembler warns when a symbol is made weak after
being defined global:

  warning: v8_flush_l3_cache changed binding to STB_WEAK

Use WEAK() from linkage.h, which emits .weak before the label.

Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 arch/arm/cpu/cache-armv8.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/cpu/cache-armv8.S b/arch/arm/cpu/cache-armv8.S
index e6f50886f924..b381da5e34d0 100644
--- a/arch/arm/cpu/cache-armv8.S
+++ b/arch/arm/cpu/cache-armv8.S
@@ -229,8 +229,7 @@ ENTRY(v8_invalidate_icache_all)
 ENDPROC(v8_invalidate_icache_all)
 
 .section .text.v8_flush_l3_cache
-ENTRY(v8_flush_l3_cache)
+WEAK(v8_flush_l3_cache)
 	mov	x0, #0			/* return status as success */
 	ret
 ENDPROC(v8_flush_l3_cache)
-	.weak	v8_flush_l3_cache
-- 
2.47.3




More information about the barebox mailing list