linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / mips / kernel / process.c
index 7ab67f7..092679c 100644 (file)
@@ -8,6 +8,7 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  * Copyright (C) 2004 Thiemo Seufer
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <asm/elf.h>
 #include <asm/isadep.h>
 #include <asm/inst.h>
-#ifdef CONFIG_MIPS_MT_SMTC
-#include <asm/mipsmtregs.h>
-extern void smtc_idle_loop_hook(void);
-#endif /* CONFIG_MIPS_MT_SMTC */
 
 /*
  * The idle thread. There's no useful work to be done, so just try to conserve
@@ -54,22 +51,26 @@ ATTRIB_NORET void cpu_idle(void)
 {
        /* endless idle loop with no priority at all */
        while (1) {
-               while (!need_resched()) {
-#ifdef CONFIG_MIPS_MT_SMTC
-                       smtc_idle_loop_hook();
-#endif /* CONFIG_MIPS_MT_SMTC */
+               while (!need_resched())
                        if (cpu_wait)
                                (*cpu_wait)();
-               }
                preempt_enable_no_resched();
                schedule();
                preempt_disable();
        }
 }
 
+extern void do_signal(struct pt_regs *regs);
+extern void do_signal32(struct pt_regs *regs);
+
 /*
  * Native o32 and N64 ABI without DSP ASE
  */
+extern int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
+        int signr, sigset_t *set);
+extern int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
+        int signr, sigset_t *set, siginfo_t *info);
+
 struct mips_abi mips_abi = {
        .do_signal      = do_signal,
 #ifdef CONFIG_TRAD_SIGNALS
@@ -82,6 +83,11 @@ struct mips_abi mips_abi = {
 /*
  * o32 compatibility on 64-bit kernels, without DSP ASE
  */
+extern int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
+        int signr, sigset_t *set);
+extern int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
+        int signr, sigset_t *set, siginfo_t *info);
+
 struct mips_abi mips_abi_32 = {
        .do_signal      = do_signal32,
        .setup_frame    = setup_frame_32,
@@ -93,6 +99,9 @@ struct mips_abi mips_abi_32 = {
 /*
  * N32 on 64-bit kernels, without DSP ASE
  */
+extern int setup_rt_frame_n32(struct k_sigaction * ka, struct pt_regs *regs,
+        int signr, sigset_t *set, siginfo_t *info);
+
 struct mips_abi mips_abi_n32 = {
        .do_signal      = do_signal,
        .setup_rt_frame = setup_rt_frame_n32
@@ -184,17 +193,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
        childregs->cp0_status &= ~(ST0_CU2|ST0_CU1);
        clear_tsk_thread_flag(p, TIF_USEDFPU);
 
-#ifdef CONFIG_MIPS_MT_FPAFF
-       /*
-        * FPU affinity support is cleaner if we track the
-        * user-visible CPU affinity from the very beginning.
-        * The generic cpus_allowed mask will already have
-        * been copied from the parent before copy_thread
-        * is invoked.
-        */
-       p->thread.user_cpus_allowed = p->cpus_allowed;
-#endif /* CONFIG_MIPS_MT_FPAFF */
-
        if (clone_flags & CLONE_SETTLS)
                ti->tp_value = regs->regs[7];
 
@@ -437,3 +435,4 @@ unsigned long get_wchan(struct task_struct *p)
        return pc;
 }
 
+EXPORT_SYMBOL(get_wchan);