diff options
Diffstat (limited to 'arch/sh/kernel/process_64.c')
-rw-r--r-- | arch/sh/kernel/process_64.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index b9dbd2d3b4a5..b7aa09235b51 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <asm/syscalls.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
30 | #include <asm/mmu_context.h> | 31 | #include <asm/mmu_context.h> |
@@ -395,6 +396,7 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *)) | |||
395 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | 396 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) |
396 | { | 397 | { |
397 | struct pt_regs regs; | 398 | struct pt_regs regs; |
399 | int pid; | ||
398 | 400 | ||
399 | memset(®s, 0, sizeof(regs)); | 401 | memset(®s, 0, sizeof(regs)); |
400 | regs.regs[2] = (unsigned long)arg; | 402 | regs.regs[2] = (unsigned long)arg; |
@@ -403,8 +405,13 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
403 | regs.pc = (unsigned long)kernel_thread_helper; | 405 | regs.pc = (unsigned long)kernel_thread_helper; |
404 | regs.sr = (1 << 30); | 406 | regs.sr = (1 << 30); |
405 | 407 | ||
406 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, | 408 | /* Ok, create the new process.. */ |
407 | ®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; | ||
408 | } | 415 | } |
409 | 416 | ||
410 | /* | 417 | /* |