23 lines
723 B
Diff
23 lines
723 B
Diff
--- a/kernel/cycle.h 2020-12-10 05:02:44.000000000 -0700
|
|
+++ b/kernel/cycle.h 2022-07-01 20:16:52.642814700 -0600
|
|
@@ -539,6 +539,10 @@
|
|
#define HAVE_TICK_COUNTER
|
|
#endif
|
|
|
|
+/*----------------------------------------------------------------*/
|
|
+/*
|
|
+ * ARMv8 cycle counter
|
|
+ */
|
|
#if defined(__aarch64__) && defined(HAVE_ARMV8_CNTVCT_EL0) && !defined(HAVE_ARMV8_PMCCNTR_EL0)
|
|
typedef uint64_t ticks;
|
|
static inline ticks getticks(void)
|
|
@@ -551,7 +555,7 @@
|
|
#define HAVE_TICK_COUNTER
|
|
#endif
|
|
|
|
-#if defined(__aarch64__) && defined(HAVE_ARMV8_PMCCNTR_EL0)
|
|
+#if (defined(__aarch64__) && defined(HAVE_ARMV8_PMCCNTR_EL0)) || (defined(_M_ARM64) && defined(__clang__))
|
|
typedef uint64_t ticks;
|
|
static inline ticks getticks(void)
|
|
{
|