diff options
| author | Evgenii Shatokhin <[email protected]> | 2023-03-06 00:22:45 +0300 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-03-10 14:00:36 +0530 |
| commit | d56049e299cce3bca2022903a5550acdc323d8a4 (patch) | |
| tree | a6b4fe331514ef1d218dbc7844c47332e9a53b2b /include | |
| parent | c631a7da279e735590231d2ae432fbc05743aa9e (diff) | |
lib: sbi: Refactor the calls to sbi_hart_switch_mode()
Move them into sbi_hsm_hart_start_finish() and sbi_hsm_hart_resume_finish()
to make them easier to manage.
This will be used by subsequent patches.
Suggested-by: Anup Patel <[email protected]>
Signed-off-by: Evgenii Shatokhin <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_hsm.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h index c0b48303..4b5601ba 100644 --- a/include/sbi/sbi_hsm.h +++ b/include/sbi/sbi_hsm.h @@ -66,7 +66,8 @@ int sbi_hsm_hart_start(struct sbi_scratch *scratch, u32 hartid, ulong saddr, ulong smode, ulong arg1); int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow); void sbi_hsm_hart_resume_start(struct sbi_scratch *scratch); -void sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch); +void __noreturn sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch, + u32 hartid); int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type, ulong raddr, ulong rmode, ulong arg1); bool sbi_hsm_hart_change_state(struct sbi_scratch *scratch, long oldstate, @@ -76,6 +77,7 @@ int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid); int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom, ulong hbase, ulong *out_hmask); void __sbi_hsm_suspend_non_ret_save(struct sbi_scratch *scratch); -void sbi_hsm_prepare_next_jump(struct sbi_scratch *scratch, u32 hartid); +void __noreturn sbi_hsm_hart_start_finish(struct sbi_scratch *scratch, + u32 hartid); #endif |
