sparc: Don't bother masking out TICK_PRIV_BIT in VDSO code.
authorDavid S. Miller <davem@davemloft.net>
Mon, 22 Oct 2018 05:10:51 +0000 (22:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Oct 2018 22:31:38 +0000 (15:31 -0700)
If the TICK_PRIV_BIT was set, we would not be able to read the tick
register in user space, which is where this code runs.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/vdso/vclock_gettime.c

index 75c49fcb57aa27c62022212999dd68aeeb5e1a74..4e853d1582c71ab318f70fec1022e67c6b3091c1 100644 (file)
 #include <asm/clocksource.h>
 #include <asm/vvar.h>
 
-#undef TICK_PRIV_BIT
-#ifdef CONFIG_SPARC64
-#define        TICK_PRIV_BIT   (1UL << 63)
-#else
-#define        TICK_PRIV_BIT   (1ULL << 63)
-#endif
-
 #ifdef CONFIG_SPARC64
 #define SYSCALL_STRING                                                 \
        "ta     0x6d;"                                                  \
@@ -112,7 +105,7 @@ notrace static __always_inline u64 vread_tick(void)
                             "rd                %%asr24, %0\n\t"
                             ".popsection\n"
                             : "=r" (ret));
-       return ret & ~TICK_PRIV_BIT;
+       return ret;
 }
 #else
 notrace static __always_inline u64 vread_tick(void)