X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-um%2Fprocessor-generic.h;h=78c0599cc80c4da8e21d8c897a801560edbcb5e1;hb=c4ec20717313daafba59225f812db89595952b83;hp=da07a69ce82a5bda77c7746faa22b8c4afdd8a99;hpb=944d79559d154c12becde0dab327016cf438f46c;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index da07a69ce82..78c0599cc80 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ @@ -10,46 +10,33 @@ 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; struct thread_struct { - /* This flag is set to 1 before calling do_fork (and analyzed in + struct task_struct *saved_task; + /* + * This flag is set to 1 before calling do_fork (and analyzed in * 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; + * from kernelspace (i.e. kernel_thread() or fork_idle(), + * as of 2.6.11). + */ int forking; int nsyscalls; struct pt_regs regs; int singlestep_syscall; void *fault_addr; - void *fault_catcher; + jmp_buf *fault_catcher; struct task_struct *prev_sched; unsigned long temp_stack; - void *exec_buf; + jmp_buf *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; - int mm_count; - } skas; -#endif - } mode; + jmp_buf switch_buf; + int mm_count; struct { int op; union { @@ -72,7 +59,7 @@ struct thread_struct { { \ .forking = 0, \ .nsyscalls = 0, \ - .regs = EMPTY_REGS, \ + .regs = EMPTY_REGS, \ .fault_addr = NULL, \ .prev_sched = NULL, \ .temp_stack = 0, \ @@ -87,7 +74,10 @@ typedef struct { extern struct task_struct *alloc_task_struct(void); -extern void release_thread(struct task_struct *); +static inline void release_thread(struct task_struct *task) +{ +} + extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); static inline void prepare_to_copy(struct task_struct *tsk) @@ -137,14 +127,7 @@ extern struct cpuinfo_um cpu_data[]; #endif -#ifdef CONFIG_MODE_SKAS -#define KSTK_REG(tsk, reg) \ - ({ union uml_pt_regs regs; \ - get_thread_regs(®s, tsk->thread.mode.skas.switch_buf); \ - UPT_REG(®s, reg); }) -#else -#define KSTK_REG(tsk, reg) (0xbadbabe) -#endif +#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf) #define get_wchan(p) (0) #endif