diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-01 16:42:55 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-01 16:42:55 +0300 |
| commit | 7a1c7ed1b1c30ba4c668194a955fb414e471bade (patch) | |
| tree | 2f49f04e455f004af640918abfcd6f91ce6a1323 /arch/riscv64/kernel/sbi.h | |
| parent | e8f80bae97a835b6b256228d4bbeaf48ae16dcbb (diff) | |
| download | kmi-7a1c7ed1b1c30ba4c668194a955fb414e471bade.tar.gz kmi-7a1c7ed1b1c30ba4c668194a955fb414e471bade.zip | |
add sleep syscall
+ Sets the current core to sleep
Diffstat (limited to 'arch/riscv64/kernel/sbi.h')
| -rw-r--r-- | arch/riscv64/kernel/sbi.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
