lkml.org 
[lkml]   [2017]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 12/18] arm64: arch_timer: Make workaround methods optional
Date
Not all errata need to workaround all access types. Allow them to
be optional.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/include/asm/arch_timer.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h
index 58572d38e9db..d46cf21e8b80 100644
--- a/arch/arm64/include/asm/arch_timer.h
+++ b/arch/arm64/include/asm/arch_timer.h
@@ -61,8 +61,9 @@ extern const struct arch_timer_erratum_workaround *timer_unstable_counter_workar
#define arch_timer_reg_read_stable(reg) \
({ \
u64 _val; \
- if (needs_unstable_timer_counter_workaround()) \
- _val = timer_unstable_counter_workaround->read_##reg();\
+ if (needs_unstable_timer_counter_workaround() && \
+ timer_unstable_counter_workaround->read_##reg) \
+ _val = timer_unstable_counter_workaround->read_##reg(); \
else \
_val = read_sysreg(reg); \
_val; \
--
2.11.0
\
 
 \ /
  Last update: 2017-03-20 19:43    [W:0.252 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site