summaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-11-30 18:34:25 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2012-12-05 11:20:03 +0000
commit251db45336c8fb5fd0c36f71aabc6950e427110f (patch)
treeda96296e521bb811ff79d3eab047ef6f47858f3e /arch/arm64
parentf2bd5d240635b15b5e32cd3c36ed0f4ad31e8442 (diff)
arm64: vdso: fix clocksource mask when extracting bottom 56 bits
The generic timer clocksource has 56 bits of precision and as such must be masked appropriately after we have read it. The current mask generated by a movn instruction is off by 4 bits, so we accidentally include the top 4 bits in the final value. This patch fixes the broken mask. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/kernel/vdso/gettimeofday.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S
index dcb8c203a3b..05c1229a287 100644
--- a/arch/arm64/kernel/vdso/gettimeofday.S
+++ b/arch/arm64/kernel/vdso/gettimeofday.S
@@ -223,7 +223,7 @@ ENTRY(__do_get_tspec)
/* Calculate cycle delta and convert to ns. */
sub x10, x9, x10
/* We can only guarantee 56 bits of precision. */
- movn x9, #0xff0, lsl #48
+ movn x9, #0xff00, lsl #48
and x10, x9, x10
mul x10, x10, x14
lsr x10, x10, x15