Skip to contentSkip to conversation

cobalt/tick: dovetail: Always read timer name from CPU 0

PATCH New Jan Kiszka 1 participant 1 message Jul 5, 2021

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 cobalt/tick: dovetail: Always read timer name from CPU 0

From: Jan Kiszka <[email protected]>

__this_cpu_read will generate a warning when called by print_core_clock_status because the context is detected as preemptible. Avoid this by picking up the name from CPU 0, just like ipipe_timer_name did.

---
 kernel/cobalt/dovetail/tick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cobalt/dovetail/tick.c +1 -1
index ac343e4d3d..873b62471e 100644
@@ -16,7 +16,7 @@ static DEFINE_PER_CPU(struct clock_proxy_device *, proxy_device);
 
 const char *pipeline_timer_name(void)
 {
-	struct clock_proxy_device *dev = __this_cpu_read(proxy_device);
+	struct clock_proxy_device *dev = per_cpu(proxy_device, 0);
 	struct clock_event_device *real_dev = dev->real_device;
 
 	/*
Signature · 1 line
2.26.2