diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/process_32.c | 9 | ||||
-rw-r--r-- | arch/sh/kernel/process_64.c | 10 | ||||
-rw-r--r-- | arch/sh/kernel/sys_sh.c | 2 |
3 files changed, 17 insertions, 4 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" | |||
169 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | 169 | int 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(®s, 0, sizeof(regs)); | 174 | memset(®s, 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 | ®s, 0, NULL, NULL); | 183 | ®s, 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 | /* |
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 | /* |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 0dfb88925add..38f098c9c72d 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -171,6 +171,8 @@ asmlinkage int sys_ipc(uint call, int first, int second, | |||
171 | version = call >> 16; /* hack for backward compatibility */ | 171 | version = call >> 16; /* hack for backward compatibility */ |
172 | call &= 0xffff; | 172 | call &= 0xffff; |
173 | 173 | ||
174 | trace_mark(kernel_arch_ipc_call, "call %u first %d", call, first); | ||
175 | |||
174 | if (call <= SEMTIMEDOP) | 176 | if (call <= SEMTIMEDOP) |
175 | switch (call) { | 177 | switch (call) { |
176 | case SEMOP: | 178 | case SEMOP: |