Revert "ARM: vdso: Remove dependency with the arch_timer driver internals"
authorKhusika Dhamar Gusti <khusikadhamar@gmail.com>
Mon, 16 Sep 2019 07:32:55 +0000 (14:32 +0700)
committerBruno Martins <bgcngm@gmail.com>
Fri, 20 Oct 2023 14:58:01 +0000 (15:58 +0100)
This reverts commit 79940ddbd08866e556e8c8da59e25754e1d89462.

Signed-off-by: Khusika Dhamar Gusti <khusikadhamar@gmail.com>
Change-Id: Ic7d585615698ee688b5a3999da07d3118563bb78

arch/arm/include/asm/cp15.h
arch/arm/vdso/vgettimeofday.c

index b458e41227943433bd8bd9855fa6127e44dead28..b74b174ac9fcd63fde1332fe7e0a412b3490f6ac 100644 (file)
@@ -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)
index 3af02d2a0b7f23008894e1e526d1c11e69931683..79214d5ff097044dc59e0394c87749e68d8f4d92 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/compiler.h>
 #include <linux/hrtimer.h>
 #include <linux/time.h>
+#include <asm/arch_timer.h>
 #include <asm/barrier.h>
 #include <asm/bug.h>
-#include <asm/cp15.h>
 #include <asm/page.h>
 #include <asm/unistd.h>
 #include <asm/vdso_datapage.h>
@@ -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;