summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/process.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-01-04 18:35:03 +0100
committerPalmer Dabbelt <palmer@dabbelt.com>2018-01-08 00:14:39 +0100
commit1125203c13b9da32125e171b4bd75e93d4918ddd (patch)
treeb7fec011a68452c8d65526dad46fedda9056e511 /arch/riscv/kernel/process.c
parentriscv: remove CONFIG_MMU ifdefs (diff)
downloadlinux-1125203c13b9da32125e171b4bd75e93d4918ddd.tar.xz
linux-1125203c13b9da32125e171b4bd75e93d4918ddd.zip
riscv: rename SR_* constants to match the spec
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel/process.c')
-rw-r--r--arch/riscv/kernel/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 0d90dcc1fbd3..d74d4adf2d54 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -76,7 +76,7 @@ void show_regs(struct pt_regs *regs)
void start_thread(struct pt_regs *regs, unsigned long pc,
unsigned long sp)
{
- regs->sstatus = SR_PIE /* User mode, irqs on */ | SR_FS_INITIAL;
+ regs->sstatus = SR_SPIE /* User mode, irqs on */ | SR_FS_INITIAL;
regs->sepc = pc;
regs->sp = sp;
set_fs(USER_DS);
@@ -110,7 +110,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
const register unsigned long gp __asm__ ("gp");
memset(childregs, 0, sizeof(struct pt_regs));
childregs->gp = gp;
- childregs->sstatus = SR_PS | SR_PIE; /* Supervisor, irqs on */
+ childregs->sstatus = SR_SPP | SR_SPIE; /* Supervisor, irqs on */
p->thread.ra = (unsigned long)ret_from_kernel_thread;
p->thread.s[0] = usp; /* fn */