summaryrefslogtreecommitdiff
path: root/include/asm-um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:26:58 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:05 -0700
commit77bf4400319db9d2a8af6b00c2be6faa0f3d07cb (patch)
treeddc8fd48349b8d4dd2c0b26bce7f52f79b4e4077 /include/asm-um
parentae2587e41254e48e670346aefa332d7469d86352 (diff)
uml: remove code made redundant by CHOOSE_MODE removal
This patch makes a number of simplifications enabled by the removal of CHOOSE_MODE. There were lots of functions that looked like int foo(args){ foo_skas(args); } The bodies of foo_skas are now folded into foo, and their declarations (and sometimes entire header files) are deleted. In addition, the union uml_pt_regs, which was a union between the tt and skas register formats, is now a struct, with the tt-mode arm of the union being removed. It turns out that usr2_handler was unused, so it is gone. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um')
-rw-r--r--include/asm-um/mmu_context.h20
-rw-r--r--include/asm-um/processor-generic.h16
-rw-r--r--include/asm-um/ptrace-generic.h4
-rw-r--r--include/asm-um/ptrace-i386.h17
-rw-r--r--include/asm-um/ptrace-x86_64.h13
-rw-r--r--include/asm-um/tlbflush.h13
6 files changed, 16 insertions, 67 deletions
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
index a4186af65f24..0c4a375000a9 100644
--- a/include/asm-um/mmu_context.h
+++ b/include/asm-um/mmu_context.h
@@ -29,7 +29,7 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
* possible.
*/
if (old != new && (current->flags & PF_BORROWED_MM))
- switch_mm_skas(&new->context.skas.id);
+ __switch_mm(&new->context.skas.id);
}
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
@@ -41,7 +41,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
cpu_clear(cpu, prev->cpu_vm_mask);
cpu_set(cpu, next->cpu_vm_mask);
if(next != &init_mm)
- switch_mm_skas(&next->context.skas.id);
+ __switch_mm(&next->context.skas.id);
}
}
@@ -50,21 +50,9 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
{
}
-extern int init_new_context_skas(struct task_struct *task,
- struct mm_struct *mm);
+extern int init_new_context(struct task_struct *task, struct mm_struct *mm);
-static inline int init_new_context(struct task_struct *task,
- struct mm_struct *mm)
-{
- return(init_new_context_skas(task, mm));
-}
-
-extern void destroy_context_skas(struct mm_struct *mm);
-
-static inline void destroy_context(struct mm_struct *mm)
-{
- destroy_context_skas(mm);
-}
+extern void destroy_context(struct mm_struct *mm);
#endif
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h
index be3ffec3a6a6..126df73f5401 100644
--- a/include/asm-um/processor-generic.h
+++ b/include/asm-um/processor-generic.h
@@ -32,12 +32,8 @@ struct thread_struct {
unsigned long temp_stack;
void *exec_buf;
struct arch_thread arch;
- union {
- struct {
- jmp_buf switch_buf;
- int mm_count;
- } skas;
- } mode;
+ jmp_buf switch_buf;
+ int mm_count;
struct {
int op;
union {
@@ -75,7 +71,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)
@@ -125,8 +124,7 @@ extern struct cpuinfo_um cpu_data[];
#endif
-#define KSTK_REG(tsk, reg) \
- get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf)
+#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
#define get_wchan(p) (0)
#endif
diff --git a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h
index 99c87c5ce994..c8b3e6bf6a43 100644
--- a/include/asm-um/ptrace-generic.h
+++ b/include/asm-um/ptrace-generic.h
@@ -12,7 +12,7 @@
#include "sysdep/ptrace.h"
struct pt_regs {
- union uml_pt_regs regs;
+ struct uml_pt_regs regs;
};
#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
@@ -44,7 +44,7 @@ extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
extern void show_regs(struct pt_regs *regs);
-extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
+extern void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
int error_code);
extern int arch_copy_tls(struct task_struct *new);
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h
index 4928a31aca7d..b733fa32b618 100644
--- a/include/asm-um/ptrace-i386.h
+++ b/include/asm-um/ptrace-i386.h
@@ -46,21 +46,4 @@ extern int ptrace_get_thread_area(struct task_struct *child, int idx,
extern int ptrace_set_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc);
-extern int do_set_thread_area_skas(struct user_desc *info);
-extern int do_get_thread_area_skas(struct user_desc *info);
-
-extern int do_set_thread_area_tt(struct user_desc *info);
-extern int do_get_thread_area_tt(struct user_desc *info);
-
-extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to);
-extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to);
-
-extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to);
-extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to);
-
-extern int do_get_thread_area_skas(struct user_desc *info);
-extern int do_set_thread_area_skas(struct user_desc *info);
-
-struct task_struct;
-
#endif
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h
index bf61d17de3f7..4c475350dcf0 100644
--- a/include/asm-um/ptrace-x86_64.h
+++ b/include/asm-um/ptrace-x86_64.h
@@ -76,15 +76,6 @@ static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
return -ENOSYS;
}
-static inline void arch_switch_to_tt(struct task_struct *from,
- struct task_struct *to)
-{
-}
-
-extern void arch_switch_to_skas(struct task_struct *from,
- struct task_struct *to);
-
-extern long arch_prctl_skas(struct task_struct *task, int code,
- unsigned long __user *addr);
-
+extern long arch_prctl(struct task_struct *task, int code,
+ unsigned long __user *addr);
#endif
diff --git a/include/asm-um/tlbflush.h b/include/asm-um/tlbflush.h
index 1520b083e9db..9d647c55350b 100644
--- a/include/asm-um/tlbflush.h
+++ b/include/asm-um/tlbflush.h
@@ -24,18 +24,7 @@ extern void flush_tlb_all(void);
extern void flush_tlb_mm(struct mm_struct *mm);
extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end);
-extern void flush_tlb_page_skas(struct vm_area_struct *vma,
- unsigned long address);
-
-static inline void flush_tlb_page(struct vm_area_struct *vma,
- unsigned long address)
-{
- address &= PAGE_MASK;
-
- flush_tlb_page_skas(vma, address);
-}
-
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long address);
extern void flush_tlb_kernel_vm(void);
extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
extern void __flush_tlb_one(unsigned long addr);