[PATCH master] ARM64: clocksource: drop too early error message
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Sep 4 03:13:45 PDT 2026
Constructors are executed directly after relocations were applied.
But only after applying relocations is it safe to run arbitrary C code.
This causes an issue: If arm_arch_timer_init() fails and CONFIG_DEBUG_LL
is enabled, the hardcoded serial port will be used, which may hang the
system if serial setup has not happened yet.
Avoid this issue by skipping the error message.
I have declarative PBL entry point support in the works, which would side
step this issue anyway, so doing anything fancy here right now is not
worth the effort.
Reported-by: Michael Tretter <m.tretter at pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/arm/lib64/clocksource.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/lib64/clocksource.c b/arch/arm/lib64/clocksource.c
index f992be09b8a7..f5fef1f3d410 100644
--- a/arch/arm/lib64/clocksource.c
+++ b/arch/arm/lib64/clocksource.c
@@ -5,6 +5,5 @@
__attribute__((constructor)) static void init_arch_clock(void)
{
- if (arm_arch_timer_init(0))
- puts_ll("Failed to setup architected timer\n");
+ arm_arch_timer_init(0);
}
--
2.47.3
More information about the barebox
mailing list