From: guenther Date: Sat, 5 Aug 2023 05:45:52 +0000 (+0000) Subject: cpu_idle_{enter,leave} are no-ops on riscv64, so just #define X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4711fcb104bff938c6ead298aef4ca7363cace20;p=openbsd cpu_idle_{enter,leave} are no-ops on riscv64, so just #define away the calls ok jca@ --- diff --git a/sys/arch/riscv64/include/cpu.h b/sys/arch/riscv64/include/cpu.h index 89ae2951620..7bd6c2cf998 100644 --- a/sys/arch/riscv64/include/cpu.h +++ b/sys/arch/riscv64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.16 2023/07/25 18:16:21 cheloha Exp $ */ +/* $OpenBSD: cpu.h,v 1.17 2023/08/05 05:45:52 guenther Exp $ */ /* * Copyright (c) 2019 Mike Larkin @@ -268,6 +268,9 @@ void fpu_load(struct proc *); extern int cpu_errata_sifive_cip_1200; +#define cpu_idle_enter() do { /* nothing */ } while (0) +#define cpu_idle_leave() do { /* nothing */ } while (0) + #endif /* _KERNEL */ #ifdef MULTIPROCESSOR diff --git a/sys/arch/riscv64/riscv64/machdep.c b/sys/arch/riscv64/riscv64/machdep.c index 60debb0b388..6220cbe43cf 100644 --- a/sys/arch/riscv64/riscv64/machdep.c +++ b/sys/arch/riscv64/riscv64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.30 2022/12/06 00:11:23 jca Exp $ */ +/* $OpenBSD: machdep.c,v 1.31 2023/08/05 05:45:52 guenther Exp $ */ /* * Copyright (c) 2014 Patrick Wildt @@ -194,11 +194,6 @@ consinit(void) sfuart_init_cons(); } -void -cpu_idle_enter(void) -{ -} - void cpu_idle_cycle(void) { @@ -208,11 +203,6 @@ cpu_idle_cycle(void) __asm volatile("wfi"); } -void -cpu_idle_leave(void) -{ -} - /* Dummy trapframe for proc0. */ struct trapframe proc0tf;