From 251db45336c8fb5fd0c36f71aabc6950e427110f Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Fri, 30 Nov 2012 18:34:25 +0000 Subject: 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 Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas --- arch/arm64/kernel/vdso/gettimeofday.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm64') 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 -- cgit v1.2.3