summaryrefslogtreecommitdiff
path: root/sys/arch/sh
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-06-09 21:15:30 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-06-09 21:15:30 +0000
commit977775b0acd19093de50847e8fa120058920b482 (patch)
tree66e016bafdba6cbc7b249007fd2ed238d874197a /sys/arch/sh
parenta2ef373f1bb8aae51b1708be19723283553a0a6d (diff)
Add a compiler barrier where missing in CPU_BUSY_CYCLE() implems
Having differences between architectures is asking for problems. And adding a barrier here just makes sense in most cases. This is also what cpu_relax() provides in Linux land. ok kettenis@ claudio@
Diffstat (limited to 'sys/arch/sh')
-rw-r--r--sys/arch/sh/include/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sh/include/cpu.h b/sys/arch/sh/include/cpu.h
index eeae150d812..e1bb2283c64 100644
--- a/sys/arch/sh/include/cpu.h
+++ b/sys/arch/sh/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.38 2024/03/31 07:23:29 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.39 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */
/*-
@@ -90,7 +90,7 @@ extern struct cpu_info cpu_info_store;
#define MAXCPUS 1
#define cpu_unidle(ci)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
/*