Skip to content

Commit

Permalink
powerpc: copy_thread don't set PPR in user interrupt frame regs
Browse files Browse the repository at this point in the history
syscalls do not set the PPR field in their interrupt frame and
return from syscall always sets the default PPR for userspace,
so setting the value in the ret_from_fork frame is not necessary
and mildly inconsistent. Remove it.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230325122904.2375060-9-npiggin@gmail.com
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Apr 11, 2023
1 parent d195ce4 commit 89fb391
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,11 +1812,6 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
f = ret_from_fork;
}

#ifdef CONFIG_PPC64
if (cpu_has_feature(CPU_FTR_HAS_PPR))
childregs->ppr = DEFAULT_PPR;
#endif

childregs->msr &= ~(MSR_FP|MSR_VEC|MSR_VSX);
p->thread.regs = childregs;
}
Expand Down

0 comments on commit 89fb391

Please sign in to comment.