aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 8303a6c65ef..0a85886a784 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -38,6 +38,7 @@
#include <linux/personality.h>
#include <linux/random.h>
#include <linux/hw_breakpoint.h>
+#include <trace/sched.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
@@ -55,6 +56,8 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
+DEFINE_TRACE(sched_kthread_create);
+
extern unsigned long _get_SP(void);
#ifndef CONFIG_SMP
@@ -663,6 +666,17 @@ void show_regs(struct pt_regs * regs)
show_instructions(regs);
}
+long original_kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
+
+long kernel_thread(int (fn) (void *), void *arg, unsigned long flags)
+{
+ long retval;
+
+ retval = original_kernel_thread(fn, arg, flags);
+ trace_sched_kthread_create(fn, retval);
+ return retval;
+}
+
void exit_thread(void)
{
discard_lazy_cpu_state();