diff options
| author | Marc Zyngier <marc.zyngier@arm.com> | 2019-04-08 11:49:03 -0400 |
|---|---|---|
| committer | Will Deacon <will.deacon@arm.com> | 2019-04-30 11:10:01 -0400 |
| commit | dea86a80033f8b0fb25a805f46dde9f3b1a7c23a (patch) | |
| tree | e4f6de3b7bfc1dd1ab16fdb9a1a4da03209b2862 | |
| parent | eae1ddc615bef9e1a1958a4b867a0a1678049bb3 (diff) | |
arm64: Use arch_timer_read_counter instead of arch_counter_get_cntvct
Only arch_timer_read_counter will guarantee that workarounds are
applied. So let's use this one instead of arch_counter_get_cntvct.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
| -rw-r--r-- | arch/arm64/kernel/traps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 8ad119c3f665..6190a60388cf 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c | |||
| @@ -493,7 +493,7 @@ static void cntvct_read_handler(unsigned int esr, struct pt_regs *regs) | |||
| 493 | { | 493 | { |
| 494 | int rt = ESR_ELx_SYS64_ISS_RT(esr); | 494 | int rt = ESR_ELx_SYS64_ISS_RT(esr); |
| 495 | 495 | ||
| 496 | pt_regs_write_reg(regs, rt, arch_counter_get_cntvct()); | 496 | pt_regs_write_reg(regs, rt, arch_timer_read_counter()); |
| 497 | arm64_skip_faulting_instruction(regs, AARCH64_INSN_SIZE); | 497 | arm64_skip_faulting_instruction(regs, AARCH64_INSN_SIZE); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| @@ -665,7 +665,7 @@ static void compat_cntvct_read_handler(unsigned int esr, struct pt_regs *regs) | |||
| 665 | { | 665 | { |
| 666 | int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT; | 666 | int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT; |
| 667 | int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT; | 667 | int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT; |
| 668 | u64 val = arch_counter_get_cntvct(); | 668 | u64 val = arch_timer_read_counter(); |
| 669 | 669 | ||
| 670 | pt_regs_write_reg(regs, rt, lower_32_bits(val)); | 670 | pt_regs_write_reg(regs, rt, lower_32_bits(val)); |
| 671 | pt_regs_write_reg(regs, rt2, upper_32_bits(val)); | 671 | pt_regs_write_reg(regs, rt2, upper_32_bits(val)); |
