summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2023-07-25 06:48:38 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2023-07-25 06:48:38 +0000
commit81f5f92789ca24809bd6d09adef9a9acb9da4537 (patch)
tree82520627528dfab16aec7a8bc2440400d0c9fed7 /sys
parentd1b58438c1c4268f1f9aa4aa925acc6fb8d82221 (diff)
cpu_idle_{enter,leave} are no-ops on amd64 now, so just #define
away the calls ok deraadt@ mpi@ miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/locore.S12
-rw-r--r--sys/arch/amd64/include/cpu.h4
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index 529100d865a..c2536e7395b 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.136 2023/07/10 03:32:10 guenther Exp $ */
+/* $OpenBSD: locore.S,v 1.137 2023/07/25 06:48:37 guenther Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
@@ -473,16 +473,6 @@ bogus_proc_pmap:
#endif /* DIAGNOSTIC */
END(cpu_switchto)
-ENTRY(cpu_idle_enter)
- ret
- lfence
-END(cpu_idle_enter)
-
-ENTRY(cpu_idle_leave)
- ret
- lfence
-END(cpu_idle_leave)
-
/* placed here for correct static branch prediction in cpu_idle_* */
NENTRY(retpoline_rax)
JMP_RETPOLINE(rax)
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index d9980176657..1975c874aad 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.155 2023/07/04 17:29:32 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.156 2023/07/25 06:48:37 guenther Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -403,7 +403,9 @@ void cpu_reset(void);
void x86_64_proc0_tss_ldt_init(void);
void cpu_proc_fork(struct proc *, struct proc *);
int amd64_pa_used(paddr_t);
+#define cpu_idle_enter() do { /* nothing */ } while (0)
extern void (*cpu_idle_cycle_fcn)(void);
+#define cpu_idle_leave() do { /* nothing */ } while (0)
struct region_descriptor;
void lgdt(struct region_descriptor *);