aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-11-16 22:28:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-16 22:28:34 -0500
commit9526d9bc23f362035cfabf044aa90f4ed1787955 (patch)
tree3c24639de58cfaebc9f2616750dedfdad4251c35 /arch/arm64/kernel/process.c
parentd042f3135e5e3a0132942335dea0155ae86a7308 (diff)
parent6929039761a3414e5c71448eb3dcc1d82fc1891d (diff)
Merge branch 'arch-arm64' into no-rebases
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r--arch/arm64/kernel/process.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index bf615e212c6c..8a5f3341861e 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -246,14 +246,20 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
246 *childregs = *regs; 246 *childregs = *regs;
247 childregs->regs[0] = 0; 247 childregs->regs[0] = 0;
248 if (is_compat_thread(task_thread_info(p))) { 248 if (is_compat_thread(task_thread_info(p))) {
249 childregs->compat_sp = stack_start; 249 if (stack_start)
250 childregs->compat_sp = stack_start;
250 } else { 251 } else {
251 /* 252 /*
252 * Read the current TLS pointer from tpidr_el0 as it may be 253 * Read the current TLS pointer from tpidr_el0 as it may be
253 * out-of-sync with the saved value. 254 * out-of-sync with the saved value.
254 */ 255 */
255 asm("mrs %0, tpidr_el0" : "=r" (tls)); 256 asm("mrs %0, tpidr_el0" : "=r" (tls));
256 childregs->sp = stack_start; 257 if (stack_start) {
258 /* 16-byte aligned stack mandatory on AArch64 */
259 if (stack_start & 15)
260 return -EINVAL;
261 childregs->sp = stack_start;
262 }
257 } 263 }
258 /* 264 /*
259 * If a TLS pointer was passed to clone (4th argument), use it 265 * If a TLS pointer was passed to clone (4th argument), use it
@@ -317,24 +323,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
317 return last; 323 return last;
318} 324}
319 325
320/*
321 * Fill in the task's elfregs structure for a core dump.
322 */
323int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs)
324{
325 elf_core_copy_regs(elfregs, task_pt_regs(t));
326 return 1;
327}
328
329/*
330 * fill in the fpe structure for a core dump...
331 */
332int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
333{
334 return 0;
335}
336EXPORT_SYMBOL(dump_fpu);
337
338unsigned long get_wchan(struct task_struct *p) 326unsigned long get_wchan(struct task_struct *p)
339{ 327{
340 struct stackframe frame; 328 struct stackframe frame;