include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / arch / avr32 / kernel / process.c
index 7f4af0b..2d76515 100644 (file)
@@ -9,7 +9,9 @@
 #include <linux/module.h>
 #include <linux/kallsyms.h>
 #include <linux/fs.h>
+#include <linux/pm.h>
 #include <linux/ptrace.h>
+#include <linux/slab.h>
 #include <linux/reboot.h>
 #include <linux/tick.h>
 #include <linux/uaccess.h>
 
 #include <asm/sysreg.h>
 #include <asm/ocd.h>
+#include <asm/syscalls.h>
 
-void (*pm_power_off)(void) = NULL;
-EXPORT_SYMBOL(pm_power_off);
+#include <mach/pm.h>
 
-extern void cpu_idle_sleep(void);
+void (*pm_power_off)(void);
+EXPORT_SYMBOL(pm_power_off);
 
 /*
  * This file handles the architecture-dependent parts of process handling..
@@ -31,7 +34,7 @@ void cpu_idle(void)
 {
        /* endless idle loop with no priority at all */
        while (1) {
-               tick_nohz_stop_sched_tick();
+               tick_nohz_stop_sched_tick(1);
                while (!need_resched())
                        cpu_idle_sleep();
                tick_nohz_restart_sched_tick();
@@ -54,6 +57,8 @@ void machine_halt(void)
 
 void machine_power_off(void)
 {
+       if (pm_power_off)
+               pm_power_off();
 }
 
 void machine_restart(char *cmd)
@@ -328,7 +333,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
 
 asmlinkage void ret_from_fork(void);
 
-int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
+int copy_thread(unsigned long clone_flags, unsigned long usp,
                unsigned long unused,
                struct task_struct *p, struct pt_regs *regs)
 {
@@ -390,8 +395,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv,
                goto out;
 
        error = do_execve(filename, uargv, uenvp, regs);
-       if (error == 0)
-               current->ptrace &= ~PT_DTRACE;
        putname(filename);
 
 out: