From c9a6759335a562b5bc5ad070cc009d90f40a8461 Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Fri, 27 Oct 2023 10:31:19 -0400 Subject: [PATCH] Serialize AArch64 timestamp counter --- src/time/timestamp/tsc/aarch64.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/time/timestamp/tsc/aarch64.rs b/src/time/timestamp/tsc/aarch64.rs index deff9ee..e064fcd 100644 --- a/src/time/timestamp/tsc/aarch64.rs +++ b/src/time/timestamp/tsc/aarch64.rs @@ -27,7 +27,9 @@ pub(crate) fn timestamp() -> u64 { unsafe { let timestamp: u64; asm!( - "mrs {}, cntvct_el0", + "isb sy + mrs {}, cntvct_el0 + isb sy", out(reg) timestamp, // Leave off `nomem` because this should be a compiler fence. options(nostack, preserves_flags),