From c67ff366ea1077fc9699294cdb4866643ceb1266 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Sat, 1 Feb 2020 22:05:26 +0000 Subject: [PATCH] thermosphere: forgot compiler barrier in get_sysreg --- thermosphere/src/sysreg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thermosphere/src/sysreg.h b/thermosphere/src/sysreg.h index 43617ef8d..61c377080 100644 --- a/thermosphere/src/sysreg.h +++ b/thermosphere/src/sysreg.h @@ -446,9 +446,9 @@ #define ENCODE_SYSREG_ISS(name) EVAL(ENCODE_SYSREG_FIELDS_ISS CAT(TUP_, name)) #define GET_SYSREG(r) ({\ - u64 __val; \ - asm volatile("mrs %0, " STRINGIZE(r) : "=r" (__val)); \ - __val; \ + u64 __val; \ + __asm__ __volatile__("mrs %0, " STRINGIZE(r) : "=r" (__val) :: "memory"); \ + __val; \ }) #define SET_SYSREG(reg, val) do { u64 temp_reg = (val); __asm__ __volatile__ ("msr " STRINGIZE(reg) ", %0" :: "r"(temp_reg) : "memory"); } while(false)