diff options
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/kernel/intvec_32.S | 2 | ||||
-rw-r--r-- | arch/tile/kernel/process.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S index 7c7e9ac2580d..c62c2f421ef3 100644 --- a/arch/tile/kernel/intvec_32.S +++ b/arch/tile/kernel/intvec_32.S | |||
@@ -1553,6 +1553,8 @@ STD_ENTRY(_sys_clone) | |||
1553 | * to be available to it on entry. It does not modify any callee-save | 1553 | * to be available to it on entry. It does not modify any callee-save |
1554 | * registers (including "lr"). It does not check what PL it is being | 1554 | * registers (including "lr"). It does not check what PL it is being |
1555 | * called at, so you'd better not call it other than at PL0. | 1555 | * called at, so you'd better not call it other than at PL0. |
1556 | * The <atomic.h> wrapper assumes it only clobbers r20-r29, so if | ||
1557 | * it ever is necessary to use more registers, be aware. | ||
1556 | * | 1558 | * |
1557 | * It does not use the stack, but since it might be re-interrupted by | 1559 | * It does not use the stack, but since it might be re-interrupted by |
1558 | * a page fault which would assume the stack was valid, it does | 1560 | * a page fault which would assume the stack was valid, it does |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 42ff73d5f637..221f12bd27fa 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -214,9 +214,10 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
214 | /* | 214 | /* |
215 | * Copy the callee-saved registers from the passed pt_regs struct | 215 | * Copy the callee-saved registers from the passed pt_regs struct |
216 | * into the context-switch callee-saved registers area. | 216 | * into the context-switch callee-saved registers area. |
217 | * We have to restore the callee-saved registers since we may | 217 | * This way when we start the interrupt-return sequence, the |
218 | * be cloning a userspace task with userspace register state, | 218 | * callee-save registers will be correctly in registers, which |
219 | * and we won't be unwinding the same kernel frames to restore them. | 219 | * is how we assume the compiler leaves them as we start doing |
220 | * the normal return-from-interrupt path after calling C code. | ||
220 | * Zero out the C ABI save area to mark the top of the stack. | 221 | * Zero out the C ABI save area to mark the top of the stack. |
221 | */ | 222 | */ |
222 | ksp = (unsigned long) childregs; | 223 | ksp = (unsigned long) childregs; |