diff options
author | Mark Rutland <mark.rutland@arm.com> | 2012-11-14 10:32:24 +0000 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2013-01-31 15:51:39 +0000 |
commit | b2deabe3ba664a1ec47400c0ca285e951874e0cc (patch) | |
tree | f23f2dfe4abb6d10a40801edbaf227d21cb31471 /arch/arm/kernel | |
parent | 1ba1cefc277865a0ac222f53bbbf2ebacad1559a (diff) | |
download | linux-b2deabe3ba664a1ec47400c0ca285e951874e0cc.tar.gz linux-b2deabe3ba664a1ec47400c0ca285e951874e0cc.tar.bz2 linux-b2deabe3ba664a1ec47400c0ca285e951874e0cc.zip |
arm: arch_timer: add arch_counter_set_user_access
Several bits in CNTKCTL reset to 0, including PL0VTEN. For architectures
using the generic timer which wish to have a fast gettimeofday vDSO
implementation, these bits must be set to 1 by the kernel. For
architectures without a vDSO, it's best to leave the bits set to 0 for
now to ensure that if and when support is added, it's implemented sanely
architecture wide.
As the bootloader might set PL0VTEN to a value that doesn't correspond
to that which the kernel prefers, we must explicitly set it to the
architecture port's preferred value.
This patch adds arch_counter_set_user_access, which sets the PL0 access
permissions to that required by the architecture. For arch/arm, this
currently means disabling all userspace access.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/arch_timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c index c8dfec052f2d..94f503394c5c 100644 --- a/arch/arm/kernel/arch_timer.c +++ b/arch/arm/kernel/arch_timer.c @@ -155,6 +155,8 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk) enable_percpu_irq(arch_timer_ppi[PHYS_NONSECURE_PPI], 0); } + arch_counter_set_user_access(); + return 0; } |