diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-um/a.out.h | 7 | ||||
-rw-r--r-- | include/asm-um/mmu_context.h | 12 | ||||
-rw-r--r-- | include/asm-um/processor-generic.h | 1 | ||||
-rw-r--r-- | include/asm-um/ptrace-i386.h | 12 | ||||
-rw-r--r-- | include/asm-um/tlbflush.h | 6 | ||||
-rw-r--r-- | include/asm-um/uaccess.h | 2 |
6 files changed, 10 insertions, 30 deletions
diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h index 78bc9eed26b2..7912f0997cbc 100644 --- a/include/asm-um/a.out.h +++ b/include/asm-um/a.out.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __UM_A_OUT_H | 2 | #define __UM_A_OUT_H |
3 | 3 | ||
4 | #include "asm/arch/a.out.h" | 4 | #include "asm/arch/a.out.h" |
5 | #include "choose-mode.h" | ||
6 | 5 | ||
7 | #undef STACK_TOP | 6 | #undef STACK_TOP |
8 | #undef STACK_TOP_MAX | 7 | #undef STACK_TOP_MAX |
@@ -13,10 +12,8 @@ extern unsigned long host_task_size; | |||
13 | 12 | ||
14 | #define STACK_ROOM (stacksizelim) | 13 | #define STACK_ROOM (stacksizelim) |
15 | 14 | ||
16 | extern int honeypot; | 15 | #define STACK_TOP task_size |
17 | #define STACK_TOP \ | ||
18 | CHOOSE_MODE((honeypot ? host_task_size : task_size), task_size) | ||
19 | 16 | ||
20 | #define STACK_TOP_MAX STACK_TOP | 17 | #define STACK_TOP_MAX STACK_TOP |
21 | 18 | ||
22 | #endif | 19 | #endif |
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 | ||
37 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 35 | 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, | |||
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, | |||
59 | static inline int init_new_context(struct task_struct *task, | 56 | static 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 | ||
66 | extern void destroy_context_skas(struct mm_struct *mm); | 62 | extern void destroy_context_skas(struct mm_struct *mm); |
67 | 63 | ||
68 | static inline void destroy_context(struct mm_struct *mm) | 64 | static 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 |
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 70c8183d1db0..be3ffec3a6a6 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -11,7 +11,6 @@ struct pt_regs; | |||
11 | struct task_struct; | 11 | struct task_struct; |
12 | 12 | ||
13 | #include "asm/ptrace.h" | 13 | #include "asm/ptrace.h" |
14 | #include "choose-mode.h" | ||
15 | #include "registers.h" | 14 | #include "registers.h" |
16 | #include "sysdep/archsetjmp.h" | 15 | #include "sysdep/archsetjmp.h" |
17 | 16 | ||
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index 6e2528bb0083..4928a31aca7d 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
13 | #include "asm/ptrace-generic.h" | 13 | #include "asm/ptrace-generic.h" |
14 | #include "asm/host_ldt.h" | 14 | #include "asm/host_ldt.h" |
15 | #include "choose-mode.h" | ||
16 | 15 | ||
17 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) | 16 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) |
18 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) | 17 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) |
@@ -59,15 +58,8 @@ extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); | |||
59 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | 58 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); |
60 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | 59 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); |
61 | 60 | ||
62 | static inline int do_get_thread_area(struct user_desc *info) | 61 | extern int do_get_thread_area_skas(struct user_desc *info); |
63 | { | 62 | extern int do_set_thread_area_skas(struct user_desc *info); |
64 | return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info); | ||
65 | } | ||
66 | |||
67 | static inline int do_set_thread_area(struct user_desc *info) | ||
68 | { | ||
69 | return CHOOSE_MODE_PROC(do_set_thread_area_tt, do_set_thread_area_skas, info); | ||
70 | } | ||
71 | 63 | ||
72 | struct task_struct; | 64 | struct task_struct; |
73 | 65 | ||
diff --git a/include/asm-um/tlbflush.h b/include/asm-um/tlbflush.h index e78c28c1f350..7912e18d93e3 100644 --- a/include/asm-um/tlbflush.h +++ b/include/asm-um/tlbflush.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #define __UM_TLBFLUSH_H | 7 | #define __UM_TLBFLUSH_H |
8 | 8 | ||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include "choose-mode.h" | ||
11 | 10 | ||
12 | /* | 11 | /* |
13 | * TLB flushing: | 12 | * TLB flushing: |
@@ -31,10 +30,7 @@ extern void flush_tlb_page_skas(struct vm_area_struct *vma, | |||
31 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 30 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
32 | unsigned long address) | 31 | unsigned long address) |
33 | { | 32 | { |
34 | address &= PAGE_MASK; | 33 | flush_tlb_page_skas(vma, address & PAGE_MASK); |
35 | |||
36 | CHOOSE_MODE(flush_tlb_range(vma, address, address + PAGE_SIZE), | ||
37 | flush_tlb_page_skas(vma, address)); | ||
38 | } | 34 | } |
39 | 35 | ||
40 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 36 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h index 16c734af9193..077032d4fc47 100644 --- a/include/asm-um/uaccess.h +++ b/include/asm-um/uaccess.h | |||
@@ -80,7 +80,7 @@ | |||
80 | __put_user(x, private_ptr) : -EFAULT); \ | 80 | __put_user(x, private_ptr) : -EFAULT); \ |
81 | }) | 81 | }) |
82 | 82 | ||
83 | #define strlen_user(str) strnlen_user(str, ~0UL >> 1) | 83 | #define strlen_user(str) strnlen_user(str, ~0U >> 1) |
84 | 84 | ||
85 | struct exception_table_entry | 85 | struct exception_table_entry |
86 | { | 86 | { |