aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/riscv64/kernel/smp.c4
-rw-r--r--include/kmi/uapi.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/riscv64/kernel/smp.c b/arch/riscv64/kernel/smp.c
index f061694..4695d17 100644
--- a/arch/riscv64/kernel/smp.c
+++ b/arch/riscv64/kernel/smp.c
@@ -99,7 +99,9 @@ void smp_bringup(struct vmem *b, void *fdt)
BASE_PAGE_SIZE;
/* fixup physical address of bringup */
- pm_t bringup = (pm_t)riscv_bringup - VM_KERNEL + get_load_addr();
+ pm_t bringup = (pm_t)riscv_bringup
+ - VM_KERNEL
+ + get_load_addr();
r = sbi_hart_start(hartid, bringup, satp);
diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h
index 94ac6a7..87b51b1 100644
--- a/include/kmi/uapi.h
+++ b/include/kmi/uapi.h
@@ -769,6 +769,10 @@ SYSCALL_DECLARE2(set_handler, tid, pid);
* Power off syscall.
*
* Either shut down or reboot system.
+ * At least currently, this should be called with care, requires that the caller has
+ * the POWER capability bit. Does not ensure that all threads are shut down gracefully,
+ * so caller should ensure that nothing else on the system is running when the
+ * shutdown occurs.
*
* @param t Current tcb.
* @param type Type of shutdown. \see poweroff_type.