uml: throw out CHOOSE_MODE
[safe/jmp/linux-2.6] / include / asm-um / processor-generic.h
index b953b1a..be3ffec 100644 (file)
@@ -10,9 +10,9 @@ struct pt_regs;
 
 struct task_struct;
 
-#include "linux/config.h"
 #include "asm/ptrace.h"
-#include "choose-mode.h"
+#include "registers.h"
+#include "sysdep/archsetjmp.h"
 
 struct mm_struct;
 
@@ -21,12 +21,10 @@ struct thread_struct {
         * copy_thread) to mark that we are begin called from userspace (fork /
         * vfork / clone), and reset to 0 after. It is left to 0 when called
         * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */
+       struct task_struct *saved_task;
        int forking;
        int nsyscalls;
        struct pt_regs regs;
-       unsigned long cr2;
-       int err;
-       unsigned long trap_no;
        int singlestep_syscall;
        void *fault_addr;
        void *fault_catcher;
@@ -35,21 +33,10 @@ struct thread_struct {
        void *exec_buf;
        struct arch_thread arch;
        union {
-#ifdef CONFIG_MODE_TT
                struct {
-                       int extern_pid;
-                       int tracing;
-                       int switch_pipe[2];
-                       int vm_seq;
-               } tt;
-#endif
-#ifdef CONFIG_MODE_SKAS
-               struct {
-                       void *switch_buf;
-                       void *fork_buf;
+                       jmp_buf switch_buf;
                        int mm_count;
                } skas;
-#endif
        } mode;
        struct {
                int op;
@@ -74,8 +61,6 @@ struct thread_struct {
        .forking                = 0, \
        .nsyscalls              = 0, \
         .regs                  = EMPTY_REGS, \
-       .cr2                    = 0, \
-       .err                    = 0, \
        .fault_addr             = NULL, \
        .prev_sched             = NULL, \
        .temp_stack             = 0, \
@@ -92,7 +77,6 @@ extern struct task_struct *alloc_task_struct(void);
 
 extern void release_thread(struct task_struct *);
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
-extern void dump_thread(struct pt_regs *regs, struct user *u);
 
 static inline void prepare_to_copy(struct task_struct *tsk)
 {
@@ -140,19 +124,9 @@ extern struct cpuinfo_um cpu_data[];
 #define current_cpu_data boot_cpu_data
 #endif
 
-#define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs))
-#define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs))
+
+#define KSTK_REG(tsk, reg) \
+       get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf)
 #define get_wchan(p) (0)
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */