return last;
}
--/*
- * Fill in the task's elfregs structure for a core dump.
- * Shuffle the argument into the correct register before calling the
- * thread function. x1 is the thread argument, x2 is the pointer to
- * the thread function, and x3 points to the exit function.
-- */
- int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs)
- {
- elf_core_copy_regs(elfregs, task_pt_regs(t));
- return 1;
- }
-extern void kernel_thread_helper(void);
-asm( ".section .text\n"
-" .align\n"
-" .type kernel_thread_helper, #function\n"
-"kernel_thread_helper:\n"
-" mov x0, x1\n"
-" mov x30, x3\n"
-" br x2\n"
-" .size kernel_thread_helper, . - kernel_thread_helper\n"
-" .previous");
-
-#define kernel_thread_exit do_exit
--
--/*
- * fill in the fpe structure for a core dump...
- * Create a kernel thread.
-- */
- int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
-pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
--{
- return 0;
- struct pt_regs regs;
-
- memset(®s, 0, sizeof(regs));
-
- regs.regs[1] = (unsigned long)arg;
- regs.regs[2] = (unsigned long)fn;
- regs.regs[3] = (unsigned long)kernel_thread_exit;
- regs.pc = (unsigned long)kernel_thread_helper;
- regs.pstate = PSR_MODE_EL1h;
-
- return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
--}
- EXPORT_SYMBOL(dump_fpu);
-EXPORT_SYMBOL(kernel_thread);
--
unsigned long get_wchan(struct task_struct *p)
{
struct stackframe frame;