aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/vdso/vgettimeofday.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2019-04-08 16:49:01 +0100
committerWill Deacon <will.deacon@arm.com>2019-04-30 16:09:07 +0100
commit1f5b62f09f6b314c8d70b9de5182dae4de1f94da (patch)
tree08a776abbfc1dad82ae646b908fc8ad28f100c59 /arch/arm/vdso/vgettimeofday.c
parentarm64: Apply ARM64_ERRATUM_1188873 to Neoverse-N1 (diff)
downloadlinux-dev-1f5b62f09f6b314c8d70b9de5182dae4de1f94da.tar.xz
linux-dev-1f5b62f09f6b314c8d70b9de5182dae4de1f94da.zip
ARM: vdso: Remove dependency with the arch_timer driver internals
The VDSO code uses the kernel helper that was originally designed to abstract the access between 32 and 64bit systems. It worked so far because this function is declared as 'inline'. As we're about to revamp that part of the code, the VDSO would break. Let's fix it by doing what should have been done from the start, a proper system register access. Reviewed-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>
Diffstat (limited to 'arch/arm/vdso/vgettimeofday.c')
-rw-r--r--arch/arm/vdso/vgettimeofday.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c
index a9dd619c6c29..7bdbf5d5c47d 100644
--- a/arch/arm/vdso/vgettimeofday.c
+++ b/arch/arm/vdso/vgettimeofday.c
@@ -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,7 +123,8 @@ static notrace u64 get_ns(struct vdso_data *vdata)
u64 cycle_now;
u64 nsec;
- cycle_now = arch_counter_get_cntvct();
+ isb();
+ cycle_now = read_sysreg(CNTVCT);
cycle_delta = (cycle_now - vdata->cs_cycle_last) & vdata->cs_mask;