diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-02-11 17:32:37 -0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-02-24 18:07:55 +0530 |
commit | b677a9b8d641f1c16a4f8f52e00019a9bc747893 (patch) | |
tree | 5fa5b11867958b81cbeec0678819b60512fb9386 /lib/sbi/sbi_ipi.c | |
parent | f64f4b92e411709227ee830bc1e9f8f87c72423e (diff) |
lib: Implement hart hotplug
This patch adds support for hart hotplug in OpenSBI using a generic WFI
based approach. Hart hotplug can be achieved via SBI HSM extension which
allows supervisor mode software to start or stop any harts anytime.
Any platform wishes to implement platform specific hart hotplug must
implement both hart_start and hart_stop in addition to enable platform
feature SBI_PLATFORM_HAS_HART_HOTPLUG.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ipi.c')
-rw-r--r-- | lib/sbi/sbi_ipi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c index d3b48fe..006844b 100644 --- a/lib/sbi/sbi_ipi.c +++ b/lib/sbi/sbi_ipi.c @@ -14,6 +14,7 @@ #include <sbi/sbi_bitops.h> #include <sbi/sbi_error.h> #include <sbi/sbi_hart.h> +#include <sbi/sbi_hsm.h> #include <sbi/sbi_init.h> #include <sbi/sbi_ipi.h> #include <sbi/sbi_platform.h> @@ -153,7 +154,7 @@ void sbi_ipi_clear_smode(struct sbi_scratch *scratch) static void sbi_ipi_process_halt(struct sbi_scratch *scratch) { - sbi_exit(scratch); + sbi_hsm_hart_stop(scratch, TRUE); } static struct sbi_ipi_event_ops ipi_halt_ops = { |