#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
+#include <linux/kallsyms.h>
#include <asm/io.h>
#include <asm/offsets.h>
#include <asm/pdc_chassis.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
+#include <asm/unwind.h>
int hlt_counter;
if(usp == 0)
usp = regs->gr[30];
- return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid, NULL);
+ return do_fork(clone_flags, usp, regs, 0, user_tid, NULL);
}
int
return error;
}
+
+unsigned long
+get_wchan(struct task_struct *p)
+{
+ struct unwind_frame_info info;
+ unsigned long ip;
+ int count = 0;
+ /*
+ * These bracket the sleeping functions..
+ */
+
+ unwind_frame_init_from_blocked_task(&info, p);
+ do {
+ if (unwind_once(&info) < 0)
+ return 0;
+ ip = info.ip;
+ if (!in_sched_functions(ip))
+ return ip;
+ } while (count++ < 16);
+ return 0;
+}