Skip to contentSkip to conversation

clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes.

PATCH New [email protected] 1 participant 2 messages Dec 31, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 6/14 clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes.

From: Guo Ren <[email protected]>

Timer startup must after timer_irq_enable. For qemu, timer tick irq hanppens but irq not enable, so it will cause qemu boot failed.

---
 drivers/clocksource/timer-mp-csky.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/timer-mp-csky.c +2 -2
index a8acc43..3cb6dbc 100644
@@ -79,11 +79,11 @@ static int csky_mptimer_starting_cpu(unsigned int cpu)
 
 	to->clkevt.cpumask = cpumask_of(cpu);
 
+	enable_percpu_irq(csky_mptimer_irq, 0);
+
 	clockevents_config_and_register(&to->clkevt, timer_of_rate(to),
 					2, ULONG_MAX);
 
-	enable_percpu_irq(csky_mptimer_irq, 0);
-
 	return 0;
 }
 
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH 13/14 clocksource/drivers/c-sky: fixup ftrace call-graph panic

From: Guo Ren <[email protected]>

We must add notrace on sched_clock_read, because it's called by ftrace_graph_caller.

---
 drivers/clocksource/timer-mp-csky.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-mp-csky.c +1 -1
index 3cb6dbc..183a995 100644
@@ -97,7 +97,7 @@ static int csky_mptimer_dying_cpu(unsigned int cpu)
 /*
  * clock source
  */
-static u64 sched_clock_read(void)
+static u64 notrace sched_clock_read(void)
 {
 	return (u64)mfcr(PTIM_CCVR);
 }
Signature · 1 line
2.7.4