aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r--arch/sh/kernel/process_32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 914e543102df..7b013aa8c43f 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -169,6 +169,7 @@ __asm__(".align 5\n"
169int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 169int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
170{ 170{
171 struct pt_regs regs; 171 struct pt_regs regs;
172 int pid;
172 173
173 memset(&regs, 0, sizeof(regs)); 174 memset(&regs, 0, sizeof(regs));
174 regs.regs[4] = (unsigned long)arg; 175 regs.regs[4] = (unsigned long)arg;
@@ -178,8 +179,12 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
178 regs.sr = (1 << 30); 179 regs.sr = (1 << 30);
179 180
180 /* Ok, create the new process.. */ 181 /* Ok, create the new process.. */
181 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 182 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
182 &regs, 0, NULL, NULL); 183 &regs, 0, NULL, NULL);
184
185 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
186
187 return pid;
183} 188}
184 189
185/* 190/*