diff options
Diffstat (limited to 'arch/sh/kernel/process_64.c')
-rw-r--r-- | arch/sh/kernel/process_64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index d0dddc438c0c..b7aa09235b51 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -396,6 +396,7 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *)) | |||
396 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | 396 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) |
397 | { | 397 | { |
398 | struct pt_regs regs; | 398 | struct pt_regs regs; |
399 | int pid; | ||
399 | 400 | ||
400 | memset(®s, 0, sizeof(regs)); | 401 | memset(®s, 0, sizeof(regs)); |
401 | regs.regs[2] = (unsigned long)arg; | 402 | regs.regs[2] = (unsigned long)arg; |
@@ -404,8 +405,13 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
404 | regs.pc = (unsigned long)kernel_thread_helper; | 405 | regs.pc = (unsigned long)kernel_thread_helper; |
405 | regs.sr = (1 << 30); | 406 | regs.sr = (1 << 30); |
406 | 407 | ||
407 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, | 408 | /* Ok, create the new process.. */ |
408 | ®s, 0, NULL, NULL); | 409 | pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, |
410 | ®s, 0, NULL, NULL); | ||
411 | |||
412 | trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn); | ||
413 | |||
414 | return pid; | ||
409 | } | 415 | } |
410 | 416 | ||
411 | /* | 417 | /* |