forked from Mirrors/opensbi
lib: sbi_hsm: Rename 'priv' argument to 'arg1'
'priv' argument of sbi_hsm_hart_start() and sbi_hsm_hart_suspend() may mislead people to think it stands for 'privilege mode', but it is not. Change it to 'arg1' to clearly indicate the a1 register. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -59,12 +59,12 @@ void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch);
|
|||||||
|
|
||||||
int sbi_hsm_hart_start(struct sbi_scratch *scratch,
|
int sbi_hsm_hart_start(struct sbi_scratch *scratch,
|
||||||
const struct sbi_domain *dom,
|
const struct sbi_domain *dom,
|
||||||
u32 hartid, ulong saddr, ulong smode, ulong priv);
|
u32 hartid, ulong saddr, ulong smode, ulong arg1);
|
||||||
int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow);
|
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_start(struct sbi_scratch *scratch);
|
||||||
void sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch);
|
void sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch);
|
||||||
int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type,
|
int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type,
|
||||||
ulong raddr, ulong rmode, ulong priv);
|
ulong raddr, ulong rmode, ulong arg1);
|
||||||
int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid);
|
int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid);
|
||||||
int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom,
|
int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom,
|
||||||
ulong hbase, ulong *out_hmask);
|
ulong hbase, ulong *out_hmask);
|
||||||
|
@@ -248,7 +248,7 @@ fail_exit:
|
|||||||
|
|
||||||
int sbi_hsm_hart_start(struct sbi_scratch *scratch,
|
int sbi_hsm_hart_start(struct sbi_scratch *scratch,
|
||||||
const struct sbi_domain *dom,
|
const struct sbi_domain *dom,
|
||||||
u32 hartid, ulong saddr, ulong smode, ulong priv)
|
u32 hartid, ulong saddr, ulong smode, ulong arg1)
|
||||||
{
|
{
|
||||||
unsigned long init_count;
|
unsigned long init_count;
|
||||||
unsigned int hstate;
|
unsigned int hstate;
|
||||||
@@ -281,7 +281,7 @@ int sbi_hsm_hart_start(struct sbi_scratch *scratch,
|
|||||||
return SBI_EINVAL;
|
return SBI_EINVAL;
|
||||||
|
|
||||||
init_count = sbi_init_count(hartid);
|
init_count = sbi_init_count(hartid);
|
||||||
rscratch->next_arg1 = priv;
|
rscratch->next_arg1 = arg1;
|
||||||
rscratch->next_addr = saddr;
|
rscratch->next_addr = saddr;
|
||||||
rscratch->next_mode = smode;
|
rscratch->next_mode = smode;
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ void sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type,
|
int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type,
|
||||||
ulong raddr, ulong rmode, ulong priv)
|
ulong raddr, ulong rmode, ulong arg1)
|
||||||
{
|
{
|
||||||
int oldstate, ret;
|
int oldstate, ret;
|
||||||
const struct sbi_domain *dom = sbi_domain_thishart_ptr();
|
const struct sbi_domain *dom = sbi_domain_thishart_ptr();
|
||||||
@@ -433,7 +433,7 @@ int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Save the resume address and resume mode */
|
/* Save the resume address and resume mode */
|
||||||
scratch->next_arg1 = priv;
|
scratch->next_arg1 = arg1;
|
||||||
scratch->next_addr = raddr;
|
scratch->next_addr = raddr;
|
||||||
scratch->next_mode = rmode;
|
scratch->next_mode = rmode;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user