Skip to content

powerpc: copy_thread cleanups

Nicholas Piggin linuxppc-dev 2 versions – Applied

Status from this message: Applied to powerpc/next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyApplied
  2. v18 patches 0 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8powerpc: copy_thread remove unused pkey codearch/powerpc/kernel/process.c+1 -110 replies
2/8powerpc: copy_thread make ret_from_fork register setup consistentarch/powerpc/kernel/entry_32.S arch/powerpc/kernel/process.c+1 -40 replies
3/8powerpc: use switch frame for ret_from_kernel_thread parametersarch/powerpc/kernel/entry_32.S arch/powerpc/kernel/interrupt_64.S arch/powerpc/kernel/process.c+9 -60 replies
4/8powerpc/64: ret_from_fork avoid restoring regs twicearch/powerpc/kernel/interrupt_64.S+2 -20 replies
5/8powerpc: copy_thread differentiate kthreads and user mode threadsarch/powerpc/include/asm/thread_info.h arch/powerpc/kernel/process.c+64 -360 replies
6/8powerpc: differentiate kthread from user kernel thread startarch/powerpc/kernel/entry_32.S arch/powerpc/kernel/interrupt_64.S arch/powerpc/kernel/process.c+39 -60 replies
7/8powerpc: copy_thread don't set _TIF_RESTOREALLarch/powerpc/kernel/interrupt_64.S arch/powerpc/kernel/process.c+5 -20 replies
8/8powerpc: copy_thread don't set PPR in user interrupt frame regsarch/powerpc/kernel/process.c+0 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] powerpc: copy_thread cleanups

This series cleans up copy_thread and hopefully makes the code easier to understand. The big changes in patch 3 and 4 which use the switch stack instead of user int stack for restoring fn and args parameters for the new thread.

I don't think there's any bugs fixed here because in the case of a kernel-user thread, kthread_exec would re-populate the user int frame with regs, so that should be okay.

Since v1, I only rejiged some changes between patches and minor cosmetic improvements but no functional change. Tested with 32e/s 64e/s BE and LE.

Thanks,
Nick

Nicholas Piggin (8):
powerpc: copy_thread remove unused pkey code
powerpc: copy_thread make ret_from_fork register setup consistent
powerpc: use switch frame for ret_from_kernel_thread parameters powerpc/64: ret_from_fork avoid restoring regs twice
powerpc: copy_thread differentiate kthreads and user mode threads
powerpc: differentiate kthread from user kernel thread start
powerpc: copy_thread don't set _TIF_RESTOREALL
powerpc: copy_thread don't set PPR in user interrupt frame regs

 arch/powerpc/include/asm/thread_info.h |   2 +
 arch/powerpc/kernel/entry_32.S         |  23 ++++-
 arch/powerpc/kernel/interrupt_64.S     |  28 +++++-
 arch/powerpc/kernel/process.c          | 124 ++++++++++++++-----------
 4 files changed, 113 insertions(+), 64 deletions(-)
Signature · 1 line
2.37.2