[v9, 06/10] riscv: fpu: drop SR_SD bit checking
Song Shuai
songshuaishuai at tinylab.org
Thu Jan 4 01:00:40 PST 2024
在 2023/12/29 22:36, Andy Chiu 写道:
> SR_SD summarizes the dirty status of FS/VS/XS. However, the current code
> structure does not fully utilize it because each extension specific code
> is divided into an individual segment. So remove the SR_SD check for
> now.
>
Should here add "Link" and "Fixes" tags?
> Signed-off-by: Andy Chiu <andy.chiu at sifive.com>
> ---
> arch/riscv/include/asm/switch_to.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h
> index f90d8e42f3c7..7efdb0584d47 100644
> --- a/arch/riscv/include/asm/switch_to.h
> +++ b/arch/riscv/include/asm/switch_to.h
> @@ -53,8 +53,7 @@ static inline void __switch_to_fpu(struct task_struct *prev,
> struct pt_regs *regs;
>
> regs = task_pt_regs(prev);
> - if (unlikely(regs->status & SR_SD))
> - fstate_save(prev, regs);
> + fstate_save(prev, regs);
> fstate_restore(next, task_pt_regs(next));
> }
>
Reviewed-by: Song Shuai <songshuaishuai at tinylab.org>
--
Thanks
Song Shuai
More information about the linux-riscv
mailing list