From b18555ca0c955b55da964e376348ec6405b80b54 Mon Sep 17 00:00:00 2001 From: Khusika Dhamar Gusti Date: Mon, 16 Sep 2019 14:32:55 +0700 Subject: [PATCH] Revert "ARM: vdso: Remove dependency with the arch_timer driver internals" This reverts commit 79940ddbd08866e556e8c8da59e25754e1d89462. Signed-off-by: Khusika Dhamar Gusti Change-Id: Ic7d585615698ee688b5a3999da07d3118563bb78 --- arch/arm/include/asm/cp15.h | 2 -- arch/arm/vdso/vgettimeofday.c | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h index b458e4122794..b74b174ac9fc 100644 --- a/arch/arm/include/asm/cp15.h +++ b/arch/arm/include/asm/cp15.h @@ -67,8 +67,6 @@ #define BPIALL __ACCESS_CP15(c7, 0, c5, 6) #define ICIALLU __ACCESS_CP15(c7, 0, c5, 0) -#define CNTVCT __ACCESS_CP15_64(1, c14) - extern unsigned long cr_alignment; /* defined in entry-armv.S */ static inline unsigned long get_cr(void) diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index 3af02d2a0b7f..79214d5ff097 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -18,9 +18,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -123,8 +123,7 @@ static notrace u64 get_ns(struct vdso_data *vdata) u64 cycle_now; u64 nsec; - isb(); - cycle_now = read_sysreg(CNTVCT); + cycle_now = arch_counter_get_cntvct(); cycle_delta = (cycle_now - vdata->cs_cycle_last) & vdata->cs_mask; -- 2.20.1