aboutsummaryrefslogtreecommitdiff
path: root/linux_patch/0001-enable_phycnt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linux_patch/0001-enable_phycnt.patch')
-rw-r--r--linux_patch/0001-enable_phycnt.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/linux_patch/0001-enable_phycnt.patch b/linux_patch/0001-enable_phycnt.patch
new file mode 100644
index 0000000..906690c
--- /dev/null
+++ b/linux_patch/0001-enable_phycnt.patch
@@ -0,0 +1,27 @@
+From 366e23c82dc00189853d7ea869d1aef583bca383 Mon Sep 17 00:00:00 2001
+From: James Kung <kong1191@gmail.com>
+Date: Fri, 9 Jan 2015 18:55:35 +0800
+Subject: [PATCH] Enable user access to the physical counter for performance
+ measurement
+
+---
+ drivers/clocksource/arm_arch_timer.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
+index 2133f9d..3cb6d01 100644
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -338,6 +338,9 @@ static void arch_counter_set_user_access(void)
+ | ARCH_TIMER_VIRT_EVT_EN
+ | ARCH_TIMER_USR_PCT_ACCESS_EN);
+
++ /* Enable user access to the physical counter */
++ cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
++
+ /* Enable user access to the virtual counter */
+ cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
+
+--
+1.9.3
+