aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/mmu_context.h
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:26:56 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:05 -0400
commit6aa802ce6acc9b1f0b34114b3f7c21c84872cc3a (patch)
tree74523303349693ef482dec4a1d803566b69c6abd /include/asm-um/mmu_context.h
parent4c9e13851315a25a705e7a686116e491041ca228 (diff)
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 <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/mmu_context.h')
-rw-r--r--include/asm-um/mmu_context.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
index 92b0a703fb9e..a4186af65f24 100644
--- a/include/asm-um/mmu_context.h
+++ b/include/asm-um/mmu_context.h
@@ -9,7 +9,6 @@
9#include <asm-generic/mm_hooks.h> 9#include <asm-generic/mm_hooks.h>
10 10
11#include "linux/sched.h" 11#include "linux/sched.h"
12#include "choose-mode.h"
13#include "um_mmu.h" 12#include "um_mmu.h"
14 13
15#define get_mmu_context(task) do ; while(0) 14#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)
30 * possible. 29 * possible.
31 */ 30 */
32 if (old != new && (current->flags & PF_BORROWED_MM)) 31 if (old != new && (current->flags & PF_BORROWED_MM))
33 CHOOSE_MODE(force_flush_all(), 32 switch_mm_skas(&new->context.skas.id);
34 switch_mm_skas(&new->context.skas.id));
35} 33}
36 34
37static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 35static 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,
43 cpu_clear(cpu, prev->cpu_vm_mask); 41 cpu_clear(cpu, prev->cpu_vm_mask);
44 cpu_set(cpu, next->cpu_vm_mask); 42 cpu_set(cpu, next->cpu_vm_mask);
45 if(next != &init_mm) 43 if(next != &init_mm)
46 CHOOSE_MODE((void) 0, 44 switch_mm_skas(&next->context.skas.id);
47 switch_mm_skas(&next->context.skas.id));
48 } 45 }
49} 46}
50 47
@@ -59,15 +56,14 @@ extern int init_new_context_skas(struct task_struct *task,
59static inline int init_new_context(struct task_struct *task, 56static inline int init_new_context(struct task_struct *task,
60 struct mm_struct *mm) 57 struct mm_struct *mm)
61{ 58{
62 return(CHOOSE_MODE_PROC(init_new_context_tt, init_new_context_skas, 59 return(init_new_context_skas(task, mm));
63 task, mm));
64} 60}
65 61
66extern void destroy_context_skas(struct mm_struct *mm); 62extern void destroy_context_skas(struct mm_struct *mm);
67 63
68static inline void destroy_context(struct mm_struct *mm) 64static inline void destroy_context(struct mm_struct *mm)
69{ 65{
70 CHOOSE_MODE((void) 0, destroy_context_skas(mm)); 66 destroy_context_skas(mm);
71} 67}
72 68
73#endif 69#endif