Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / arch / cris / arch-v32 / kernel / process.c
index 882be42114f749a625f9a48c9ede2c70009b6f05..120e7f796fea9707f009af5bffbc15aad6fbdd0f 100644 (file)
@@ -8,22 +8,17 @@
  * This file handles the architecture-dependent parts of process handling..
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/err.h>
 #include <linux/fs.h>
 #include <linux/slab.h>
-#include <asm/arch/hwregs/reg_rdwr.h>
-#include <asm/arch/hwregs/reg_map.h>
-#include <asm/arch/hwregs/timer_defs.h>
-#include <asm/arch/hwregs/intr_vect_defs.h>
+#include <hwregs/reg_rdwr.h>
+#include <hwregs/reg_map.h>
+#include <hwregs/timer_defs.h>
+#include <hwregs/intr_vect_defs.h>
 
 extern void stop_watchdog(void);
 
-#ifdef CONFIG_ETRAX_GPIO
-extern void etrax_gpio_wake_up_check(void); /* Defined in drivers/gpio.c. */
-#endif
-
 extern int cris_hlt_counter;
 
 /* We use this if we don't have any better idle routine. */
@@ -83,7 +78,7 @@ hard_reset_now(void)
        wd_ctrl.cmd = regk_timer_start;
 
         arch_enable_nmi();
-       REG_WR(timer, regi_timer, rw_wd_ctrl, wd_ctrl);
+       REG_WR(timer, regi_timer0, rw_wd_ctrl, wd_ctrl);
 }
 #endif
 
@@ -96,7 +91,7 @@ hard_reset_now(void)
  */
 unsigned long thread_saved_pc(struct task_struct *t)
 {
-       return (unsigned long)user_regs(t->thread_info)->erp;
+       return task_pt_regs(t)->erp;
 }
 
 static void
@@ -136,7 +131,7 @@ kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 extern asmlinkage void ret_from_fork(void);
 
 int
-copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
+copy_thread(unsigned long clone_flags, unsigned long usp,
        unsigned long unused,
        struct task_struct *p, struct pt_regs *regs)
 {
@@ -148,7 +143,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
         * fix it up. Note: the task_struct doubles as the kernel stack for the
         * task.
         */
-       childregs = user_regs(p->thread_info);
+       childregs = task_pt_regs(p);
        *childregs = *regs;     /* Struct copy of pt_regs. */
         p->set_child_tid = p->clear_child_tid = NULL;
         childregs->r10 = 0;    /* Child returns 0 after a fork/clone. */
@@ -157,13 +152,13 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
         * The TLS is in $mof beacuse it is the 5th argument to sys_clone.
         */
        if (p->mm && (clone_flags & CLONE_SETTLS)) {
-               p->thread_info->tls = regs->mof;
+               task_thread_info(p)->tls = regs->mof;
        }
 
        /* Put the switch stack right below the pt_regs. */
        swstack = ((struct switch_stack *) childregs) - 1;
 
-       /* Paramater to ret_from_sys_call. 0 is don't restart the syscall. */
+       /* Parameter to ret_from_sys_call. 0 is don't restart the syscall. */
        swstack->r9 = 0;
 
        /*