lkml.org 
[lkml]   [2019]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@wdc.com>.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Atish Patra <atish.patra@wdc.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

\
 
 \ /
  Last update: 2019-10-16 04:07    [W:0.080 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site