Thread (8 messages) 8 messages, 4 authors, 2022-03-09

Re: [PATCH] bus: ti-sysc: Fix gpt12 system timer issue with reserved status

From: Tony Lindgren <tony@atomide.com>
Date: 2021-08-10 12:52:28
Also in: linux-arm-kernel, lkml

* Pavel Machek [off-list ref] [210810 12:40]:
quoted hunk ↗ jump to hunk
Hi!

I noticed the issue while reviewing stable kernels, as this is being
backported.
quoted
Jarkko Nikula [off-list ref] reported that Beagleboard
revision c2 stopped booting. Jarkko bisected the issue down to
commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend
and resume for am3 and am4").

Let's fix the issue by tagging system timers as reserved rather than
ignoring them. And let's not probe any interconnect target module child
devices for reserved modules.
+++ b/drivers/bus/ti-sysc.c
quoted
@@ -3093,8 +3095,8 @@ static int sysc_probe(struct platform_device *pdev)
 		return error;
 
 	error = sysc_check_active_timer(ddata);
-	if (error)
-		return error;
+	if (error == -EBUSY)
+		ddata->reserved = true;
 
 	error = sysc_get_clocks(ddata);
 	if (error)
What is going on here? First, we silently ignore errors other than
EBUSY. Second, sysc_check_active_timer() can't return -EBUSY: it
returns either 0 or -ENXIO. (I checked 5.10-stable, mainline and
-next-20210806).
Thanks for spotting it, looks like there's now a conflict with commit
65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as
clockevent/source"). It seems we should also check for -ENXIO here
too. And yeah it makes sens to return on other errors for sure.

Regards,

Tony
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help