[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH 35/40] arm64: time.c: read out the frequency for arm64



This patch reads out the frequency for arm64.

Change-Id: I9a639dafd6fdcca4865d3187684a0bbbaa1c2bb7
Jira: ENTOS-247
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/time.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/time.c b/arch/arm/time.c
index 32d9c59..a0908d9 100644
--- a/arch/arm/time.c
+++ b/arch/arm/time.c
@@ -140,7 +140,11 @@ void init_time(void)
 {
     printk("Initialising timer interface\n");
 
+#if defined(__arm__)
     __asm__ __volatile__("mrc p15, 0, %0, c14, c0, 0":"=r"(counter_freq));
+#elif defined(__aarch64__)
+    __asm__ __volatile__("mrs %0, cntfrq_el0":"=r"(counter_freq));
+#endif
     cntvct_at_init = read_virtual_count();
     printk("Virtual Count register is %llx, freq = %d Hz\n",
            (unsigned long long) cntvct_at_init, counter_freq);
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.