projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b6728d
)
ARM: virt: arch_timers: enable access to physical timers
author
Marc Zyngier
<marc.zyngier@arm.com>
Wed, 1 Aug 2012 13:46:41 +0000
(14:46 +0100)
committer
Marc Zyngier
<marc.zyngier@arm.com>
Wed, 19 Sep 2012 07:32:54 +0000
(08:32 +0100)
If booting in HYP mode, it makes sense to enable the use of the
physical timers, so the kernel can use them directly.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kernel/hyp-stub.S
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/kernel/hyp-stub.S
b/arch/arm/kernel/hyp-stub.S
index 70609417deafbbc0452de3308583a8e233fba6a7..65b2417aebce0beed61a7510702168cad2d9c3dc 100644
(file)
--- a/
arch/arm/kernel/hyp-stub.S
+++ b/
arch/arm/kernel/hyp-stub.S
@@
-142,6
+142,19
@@
THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE
and r7, #0x1f @ Preserve HPMN
mcr p15, 4, r7, c1, c1, 1 @ HDCR
+#if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER)
+ @ make CNTP_* and CNTPCT accessible from PL1
+ mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1
+ lsr r7, #16
+ and r7, #0xf
+ cmp r7, #1
+ bne 1f
+ mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL
+ orr r7, r7, #3 @ PL1PCEN | PL1PCTEN
+ mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL
+1:
+#endif
+
bic r7, r4, #MODE_MASK
orr r7, r7, #SVC_MODE
THUMB( orr r7, r7, #PSR_T_BIT )
This page took
0.025316 seconds
and
5
git commands to generate.