Skip to content

Commit

Permalink
arm64: arch_timer: mark functions as __always_inline
Browse files Browse the repository at this point in the history
If CONFIG_FUNCTION_GRAPH_TRACER is enabled function
arch_counter_get_cntvct() is marked as notrace. However, function
__arch_counter_get_cntvct is marked as inline. If
CONFIG_OPTIMIZE_INLINING is set that will make the two functions
tracable which they shouldn't.

Rework so that functions __arch_counter_get_* are marked with
__always_inline so they will be inlined even if CONFIG_OPTIMIZE_INLINING
is turned on.

Fixes: 0ea4153 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Anders Roxell authored and Will Deacon committed Jun 5, 2019
1 parent 262afe9 commit f31e98b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arm64/include/asm/arch_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static inline void arch_timer_set_cntkctl(u32 cntkctl)
: "=r" (tmp) : "r" (_val)); \
} while (0)

static inline u64 __arch_counter_get_cntpct_stable(void)
static __always_inline u64 __arch_counter_get_cntpct_stable(void)
{
u64 cnt;

Expand All @@ -203,7 +203,7 @@ static inline u64 __arch_counter_get_cntpct_stable(void)
return cnt;
}

static inline u64 __arch_counter_get_cntpct(void)
static __always_inline u64 __arch_counter_get_cntpct(void)
{
u64 cnt;

Expand All @@ -213,7 +213,7 @@ static inline u64 __arch_counter_get_cntpct(void)
return cnt;
}

static inline u64 __arch_counter_get_cntvct_stable(void)
static __always_inline u64 __arch_counter_get_cntvct_stable(void)
{
u64 cnt;

Expand All @@ -223,7 +223,7 @@ static inline u64 __arch_counter_get_cntvct_stable(void)
return cnt;
}

static inline u64 __arch_counter_get_cntvct(void)
static __always_inline u64 __arch_counter_get_cntvct(void)
{
u64 cnt;

Expand Down

0 comments on commit f31e98b

Please sign in to comment.