-/* $OpenBSD: cpu.h,v 1.74 2024/05/21 23:16:06 jsg Exp $ */
+/* $OpenBSD: cpu.h,v 1.75 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */
/*-
struct cpu_info *__ci = curcpu(); \
int __s; \
\
+ __asm volatile ("" ::: "memory"); \
+ \
if (__ci->ci_ipis != 0) { \
__s = splipi(); \
alpha_ipi_process_with_frame(__ci); \
#define CPU_IS_PRIMARY(ci) 1
#define CPU_IS_RUNNING(ci) 1
#define cpu_unidle(ci) do { /* nothing */ } while (0)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#endif /* MULTIPROCESSOR */
-/* $OpenBSD: cpu.h,v 1.172 2024/06/07 16:53:35 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.173 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
#define cpu_kick(ci)
#define cpu_unidle(ci)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#endif
-/* $OpenBSD: cpu.h,v 1.66 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.67 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */
/*
void cpu_boot_secondary_processors(void);
#endif /* !MULTIPROCESSOR */
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#define curpcb curcpu()->ci_curpcb
-/* $OpenBSD: cpu.h,v 1.104 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.105 2024/06/09 21:15:29 jca Exp $ */
/*
* Copyright (c) 2000-2004 Michael Shalayeff
#define CPU_INFO_FOREACH(cii, ci) \
for (cii = 0, ci = &cpu_info[0]; cii < ncpus; cii++, ci++)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
/* types */
enum hppa_cpu_type {
-/* $OpenBSD: cpu.h,v 1.190 2024/06/07 16:53:35 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.191 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
#define cpu_kick(ci)
#define cpu_unidle(ci)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#endif
-/* $OpenBSD: cpu.h,v 1.78 2024/05/28 09:27:54 claudio Exp $ */
+/* $OpenBSD: cpu.h,v 1.79 2024/06/09 21:15:29 jca Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
#endif /* MULTIPROCESSOR */
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
struct cpu_info *set_cpu_number(cpuid_t);
-/* $OpenBSD: cpu.h,v 1.146 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.147 2024/06/09 21:15:29 jca Exp $ */
/*-
* Copyright (c) 1992, 1993
#define get_cpu_info(i) (&cpu_info_primary)
#endif
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
extern void (*md_initclock)(void);
extern void (*md_startclock)(struct cpu_info *);
-/* $OpenBSD: cpu.h,v 1.36 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.37 2024/06/09 21:15:29 jca Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
void signotify(struct proc *);
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#define curpcb curcpu()->ci_curpcb
-/* $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 $ */
/*-
#define MAXCPUS 1
#define cpu_unidle(ci)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
/*