]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: arch_timer: Enable PL0 access to the CNTVCT
authorNeil Gabriel <ngabriel@nvidia.com>
Wed, 11 Jun 2014 18:46:13 +0000 (13:46 -0500)
committerEmad Mir <emir@nvidia.com>
Mon, 30 Jun 2014 18:16:45 +0000 (11:16 -0700)
Enable usermode access to the generic virtual counter.

Change-Id: I935b73b74fd1eefb7ec7b6de07700d215ff20b87
Signed-off-by: Neil Gabriel <ngabriel@nvidia.com>
Reviewed-on: http://git-master/r/422310
Reviewed-by: Sobby Thakalath <sthakalath@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
arch/arm/include/asm/arch_timer.h

index c78c4cbd329eb92022ef5905f5af164cd6e3490b..d138aaed83820a376ab75fa769efc565210125f3 100644 (file)
@@ -93,14 +93,16 @@ static inline void __cpuinit arch_counter_set_user_access(void)
 
        asm volatile("mrc p15, 0, %0, c14, c1, 0" : "=r" (cntkctl));
 
-       /* Disable user access to both physical/virtual counters/timers */
+       /* Disable user access to the timers and the physical counter */
        /* Also disable virtual event stream */
        cntkctl &= ~(ARCH_TIMER_USR_PT_ACCESS_EN
                        | ARCH_TIMER_USR_VT_ACCESS_EN
                        | ARCH_TIMER_VIRT_EVT_EN
-                       | ARCH_TIMER_USR_VCT_ACCESS_EN
                        | ARCH_TIMER_USR_PCT_ACCESS_EN);
 
+       /* Enable user access to the virtual counter */
+       cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
+
        asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl));
 }
 #endif