提交 8c64621b 编写于 作者: M Marc Zyngier

arm64: arch_timer: Make workaround methods optional

Not all errata need to workaround all access types. Allow them to
be optional.
Acked-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
上级 01d3e3ff
......@@ -60,8 +60,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; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册