Commit db80df6e authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] fix ppc32 sys_swapcontext

This fixes a bug in the swapcontext system call on ppc32.

On ppc32, the system call entry only saves the volatile registers,
except in the case of a few system calls (e.g.  fork) which need all the
registers saved.  Swapcontext needs all the registers but we weren't
saving them all. So fixes that.
parent 86854297
......@@ -414,6 +414,14 @@ ppc_clone:
stw r0,TRAP(r1) /* register set saved */
b sys_clone
.globl ppc_swapcontext
ppc_swapcontext:
SAVE_NVGPRS(r1)
lwz r0,TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */
b sys_swapcontext
/*
* This routine switches between two different tasks. The process
* state of one is saved on its kernel stack. Then the state
......
......@@ -1363,7 +1363,7 @@ _GLOBAL(sys_call_table)
.long sys_clock_gettime
.long sys_clock_getres
.long sys_clock_nanosleep
.long sys_swapcontext
.long ppc_swapcontext
.long sys_tgkill /* 250 */
.long sys_utimes
.long sys_statfs64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment