This should be used in VMs and should also yield the same value when
running on real devices. It is also what grub uses.
Fixes: #26224
#elif defined(__aarch64__)
static uint64_t ticks_read(void) {
uint64_t val;
- __asm__ volatile ("mrs %0, cntpct_el0" : "=r" (val));
+ asm volatile("mrs %0, cntvct_el0" : "=r"(val));
return val;
}
#else
#if defined(__aarch64__)
static uint64_t ticks_freq(void) {
uint64_t freq;
- __asm__ volatile ("mrs %0, cntfrq_el0": "=r" (freq));
+ asm volatile("mrs %0, cntfrq_el0" : "=r"(freq));
return freq;
}
#else