Required for UART drivers.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 inmates/lib/arm/include/inmate.h   | 5 +++++
 inmates/lib/arm64/include/inmate.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/inmates/lib/arm/include/inmate.h b/inmates/lib/arm/include/inmate.h
index f6f62a4..e6df64e 100644
--- a/inmates/lib/arm/include/inmate.h
+++ b/inmates/lib/arm/include/inmate.h
@@ -36,6 +36,11 @@ static inline void mmio_write32(void *address, u32 value)
        *(volatile u32 *)address = value;
 }
 
+static inline void cpu_relax(void)
+{
+       asm volatile("" : : : "memory");
+}
+
 /*
  * To ease the debugging, we can send a spurious hypercall, which should return
  * -ENOSYS, but appear in the hypervisor stats for this cell.
diff --git a/inmates/lib/arm64/include/inmate.h 
b/inmates/lib/arm64/include/inmate.h
index f869833..91f1729 100644
--- a/inmates/lib/arm64/include/inmate.h
+++ b/inmates/lib/arm64/include/inmate.h
@@ -36,6 +36,11 @@ static inline void mmio_write32(void *address, u32 value)
        *(volatile u32 *)address = value;
 }
 
+static inline void cpu_relax(void)
+{
+       asm volatile("" : : : "memory");
+}
+
 /*
  * To ease the debugging, we can send a spurious hypercall, which should return
  * -ENOSYS, but appear in the hypervisor stats for this cell.
-- 
2.1.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to