From 6aa802ce6acc9b1f0b34114b3f7c21c84872cc3a Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 16 Oct 2007 01:26:56 -0700 Subject: uml: throw out CHOOSE_MODE The next stage after removing code which depends on CONFIG_MODE_TT is removing the CHOOSE_MODE abstraction, which provided both compile-time and run-time branching to either tt-mode or skas-mode code. This patch removes choose-mode.h and all inclusions of it, and replaces all CHOOSE_MODE invocations with the skas branch. This leaves a number of trivial functions which will be dealt with in a later patch. There are some changes in the uaccess and tls support which go somewhat beyond this and eliminate some of the now-redundant functions. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/mmu_context.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include/asm-um/mmu_context.h') diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 92b0a70..a4186af 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h @@ -9,7 +9,6 @@ #include #include "linux/sched.h" -#include "choose-mode.h" #include "um_mmu.h" #define get_mmu_context(task) do ; while(0) @@ -30,8 +29,7 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) * possible. */ if (old != new && (current->flags & PF_BORROWED_MM)) - CHOOSE_MODE(force_flush_all(), - switch_mm_skas(&new->context.skas.id)); + switch_mm_skas(&new->context.skas.id); } static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, @@ -43,8 +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) - CHOOSE_MODE((void) 0, - switch_mm_skas(&next->context.skas.id)); + switch_mm_skas(&next->context.skas.id); } } @@ -59,15 +56,14 @@ extern int init_new_context_skas(struct task_struct *task, static inline int init_new_context(struct task_struct *task, struct mm_struct *mm) { - return(CHOOSE_MODE_PROC(init_new_context_tt, init_new_context_skas, - task, 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) { - CHOOSE_MODE((void) 0, destroy_context_skas(mm)); + destroy_context_skas(mm); } #endif -- cgit v1.1