From 08b02efc6c490e98c79c49427e1f87c1ded49d9c Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 18 Jan 2022 04:21:42 +0300 Subject: [PATCH] ARM: don't calibrate TSC, use cntfrq_el0 info --- rpcs3/util/sysinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcs3/util/sysinfo.cpp b/rpcs3/util/sysinfo.cpp index 457cb0d417..8a440962f8 100755 --- a/rpcs3/util/sysinfo.cpp +++ b/rpcs3/util/sysinfo.cpp @@ -483,6 +483,12 @@ ullong utils::get_tsc_freq() { static const ullong cal_tsc = []() -> ullong { +#ifdef ARCH_ARM64 + u64 r = 0; + __asm__ volatile("mrs %0, cntfrq_el0" : "=r" (r)); + return r; +#endif + if (!has_invariant_tsc()) return 0;