From: Khusika Dhamar Gusti Date: Mon, 16 Sep 2019 07:32:55 +0000 (+0700) Subject: Revert "ARM: vdso: Remove dependency with the arch_timer driver internals" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b18555ca0c955b55da964e376348ec6405b80b54;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Revert "ARM: vdso: Remove dependency with the arch_timer driver internals" This reverts commit 79940ddbd08866e556e8c8da59e25754e1d89462. Signed-off-by: Khusika Dhamar Gusti Change-Id: Ic7d585615698ee688b5a3999da07d3118563bb78 --- 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;