Skip to content

Commit

Permalink
clocksource/drivers/arm_arch_timer: Don't trace count reader functions
Browse files Browse the repository at this point in the history
With v5.2-rc1, The ftrace functions_graph tracer locks up whenever it is
enabled on arm64.

Since commit 0ea4153 ("clocksource/arm_arch_timer: Use
arch_timer_read_counter to access stable counters") a function pointer
is consistently used to read the counter instead of potentially
referencing an inlinable function.

The graph tracers relies on accessing the timer counters to compute the
time spent in functions which causes the lockup when attempting to trace
these code paths.

Annotate the arm arch timer counter accessors as notrace.

Fixes: 0ea4153 ("clocksource/arm_arch_timer: Use
       arch_timer_read_counter to access stable counters")
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Julien Thierry authored and Daniel Lezcano committed Jun 12, 2019
1 parent cda03a9 commit 5d6168f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/clocksource/arm_arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg,
return val;
}

static u64 arch_counter_get_cntpct_stable(void)
static notrace u64 arch_counter_get_cntpct_stable(void)
{
return __arch_counter_get_cntpct_stable();
}

static u64 arch_counter_get_cntpct(void)
static notrace u64 arch_counter_get_cntpct(void)
{
return __arch_counter_get_cntpct();
}

static u64 arch_counter_get_cntvct_stable(void)
static notrace u64 arch_counter_get_cntvct_stable(void)
{
return __arch_counter_get_cntvct_stable();
}

static u64 arch_counter_get_cntvct(void)
static notrace u64 arch_counter_get_cntvct(void)
{
return __arch_counter_get_cntvct();
}
Expand Down

0 comments on commit 5d6168f

Please sign in to comment.