From 7a1c7ed1b1c30ba4c668194a955fb414e471bade Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 1 Jun 2024 16:42:55 +0300 Subject: add sleep syscall + Sets the current core to sleep --- arch/riscv64/kernel/sbi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/riscv64/kernel/sbi.h') diff --git a/arch/riscv64/kernel/sbi.h b/arch/riscv64/kernel/sbi.h index fe75c85..d536f58 100644 --- a/arch/riscv64/kernel/sbi.h +++ b/arch/riscv64/kernel/sbi.h @@ -149,6 +149,12 @@ static inline struct sbiret sbi_hart_start(unsigned long hartid, 0, 0, 0); } +#define FID_HSM_STOP 1 +static inline struct sbiret sbi_hart_stop() +{ + return sbi_ecall(EID_HSM, FID_HSM_STOP, 0, 0, 0, 0, 0, 0); +} + /** Hart status function ID. */ #define FID_HSM_STATUS 2 -- cgit v1.3