diff options
author | Marc Zyngier <Marc.Zyngier@arm.com> | 2013-01-30 13:17:49 -0500 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2013-06-07 05:20:27 -0400 |
commit | 0af0b189abf73d232af782df2f999235cd2fed7f (patch) | |
tree | 69c6a762517b8db6fe6902cdac2f0ba3c16ec3d1 | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
ARM: hyp: initialize CNTVOFF to zero
In order to be able to use the virtual counter in a safe way,
make sure it is initialized to zero before dropping to SVC.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Dave Martin <dave.martin@linaro.org>
-rw-r--r-- | arch/arm/kernel/hyp-stub.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 1315c4ccfa56..dbe21107945a 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S | |||
@@ -153,6 +153,8 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE | |||
153 | mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL | 153 | mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL |
154 | orr r7, r7, #3 @ PL1PCEN | PL1PCTEN | 154 | orr r7, r7, #3 @ PL1PCEN | PL1PCTEN |
155 | mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL | 155 | mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL |
156 | mov r7, #0 | ||
157 | mcrr p15, 4, r7, r7, c14 @ CNTVOFF | ||
156 | 1: | 158 | 1: |
157 | #endif | 159 | #endif |
158 | 160 | ||