Re: [PATCH] riscv: fix scratch register clearing in M-mode.

From: Paul Walmsley
Date: Fri Dec 20 2019 - 06:07:12 EST


On Thu, 19 Dec 2019, Greentime Hu wrote:

> This patch fixes that the sscratch register clearing in M-mode. It cleared
> sscratch register in M-mode, but it should clear mscratch register. That will
> cause kernel trap if the CPU core doesn't support S-mode when trying to access
> sscratch.
>
> Fixes: 9e80635619b5 ("riscv: clear the instruction cache and all registers when booting")
> Signed-off-by: Greentime Hu <greentime.hu@xxxxxxxxxx>

Thanks Greentime, queued for v5.5-rc.

- Paul