From: guenther Date: Tue, 25 Jul 2023 06:48:37 +0000 (+0000) Subject: cpu_idle_{enter,leave} are no-ops on amd64 now, so just #define X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0c7aa8fc6b9702995b2766847b2e52314571003a;p=openbsd cpu_idle_{enter,leave} are no-ops on amd64 now, so just #define away the calls ok deraadt@ mpi@ miod@ --- 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 *);