aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/sys/mmio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/sys/mmio.h b/sys/include/sys/mmio.h
index f840bf8..0cc1983 100644
--- a/sys/include/sys/mmio.h
+++ b/sys/include/sys/mmio.h
@@ -31,6 +31,7 @@
#define _SYS_MMIO_H_
#include <sys/types.h>
+#include <sys/cdefs.h>
#include <vm/vm.h>
/*
@@ -57,6 +58,7 @@
tmp += VM_HIGHER_HALF; \
} \
*(volatile TYPE *)tmp = val; \
+ __mem_barrier(); \
}
/*
@@ -74,6 +76,8 @@
if (tmp < VM_HIGHER_HALF) { \
tmp += VM_HIGHER_HALF; \
} \
+ \
+ __mem_barrier(); /* Ensure writes complete */ \
return *(volatile TYPE *)tmp; \
}