[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.9999.1910151902060.12675@viisi.sifive.com>
Date: Tue, 15 Oct 2019 19:07:17 -0700 (PDT)
From: Paul Walmsley <paul.walmsley@...ive.com>
To: Christoph Hellwig <hch@....de>
cc: Palmer Dabbelt <palmer@...ive.com>,
Damien Le Moal <damien.lemoal@....com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Atish Patra <atish.patra@....com>
Subject: Re: [PATCH 08/20] riscv: abstract out CSR names for supervisor vs
machine mode
On Tue, 3 Sep 2019, Christoph Hellwig wrote:
> Many of the privileged CSRs exist in a supervisor and machine version
> that are used very similarly. Provide a new X-naming layer so that
> we don't have to ifdef everywhere for M-mode Linux support.
>
> Contains contributions from Damien Le Moal <Damien.LeMoal@....com>.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> Reviewed-by: Atish Patra <atish.patra@....com>
[ ... ]
> diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
> index fb3a082362eb..853af1b7837b 100644
> --- a/arch/riscv/kernel/process.c
> +++ b/arch/riscv/kernel/process.c
> @@ -56,23 +56,23 @@ void show_regs(struct pt_regs *regs)
> pr_cont(" t5 : " REG_FMT " t6 : " REG_FMT "\n",
> regs->t5, regs->t6);
>
> - pr_cont("sstatus: " REG_FMT " sbadaddr: " REG_FMT " scause: " REG_FMT "\n",
> - regs->sstatus, regs->sbadaddr, regs->scause);
> + pr_cont("status: " REG_FMT " badaddr: " REG_FMT " cause: " REG_FMT "\n",
> + regs->xstatus, regs->xbadaddr, regs->xcause);
> }
>
> void start_thread(struct pt_regs *regs, unsigned long pc,
> unsigned long sp)
> {
> - regs->sstatus = SR_SPIE;
> + regs->xstatus = SR_SPIE;
Looks like this should be "regs->xstatus = SR_PIE;"
Will update it here. Let me know if you don't agree -
- Paul
Powered by blists - more mailing lists