aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um
diff options
context:
space:
mode:
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)
29 * possible. 29 * possible.
30 */ 30 */
31 if (old != new && (current->flags & PF_BORROWED_MM)) 31 if (old != new && (current->flags & PF_BORROWED_MM))
32 switch_mm_skas(&new->context.skas.id); 32 __switch_mm(&new->context.skas.id);
33} 33}
34 34
35static 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,
@@ -41,7 +41,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
41 cpu_clear(cpu, prev->cpu_vm_mask); 41 cpu_clear(cpu, prev->cpu_vm_mask);
42 cpu_set(cpu, next->cpu_vm_mask); 42 cpu_set(cpu, next->cpu_vm_mask);
43 if(next != &init_mm) 43 if(next != &init_mm)
44 switch_mm_skas(&next->context.skas.id); 44 __switch_mm(&next->context.skas.id);
45 } 45 }
46} 46}
47 47
@@ -50,21 +50,9 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
50{ 50{
51} 51}
52 52
53extern int init_new_context_skas(struct task_struct *task, 53extern int init_new_context(struct task_struct *task, struct mm_struct *mm);
54 struct mm_struct *mm);
55 54
56static inline int init_new_context(struct task_struct *task, 55extern void destroy_context(struct mm_struct *mm);
57 struct mm_struct *mm)
58{
59 return(init_new_context_skas(task, mm));
60}
61
62extern void destroy_context_skas(struct mm_struct *mm);
63
64static inline void destroy_context(struct mm_struct *mm)
65{
66 destroy_context_skas(mm);
67}
68 56
69#endif 57#endif
70 58
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 {
32 unsigned long temp_stack; 32 unsigned long temp_stack;
33 void *exec_buf; 33 void *exec_buf;
34 struct arch_thread arch; 34 struct arch_thread arch;
35 union { 35 jmp_buf switch_buf;
36 struct { 36 int mm_count;
37 jmp_buf switch_buf;
38 int mm_count;
39 } skas;
40 } mode;
41 struct { 37 struct {
42 int op; 38 int op;
43 union { 39 union {
@@ -75,7 +71,10 @@ typedef struct {
75 71
76extern struct task_struct *alloc_task_struct(void); 72extern struct task_struct *alloc_task_struct(void);
77 73
78extern void release_thread(struct task_struct *); 74static inline void release_thread(struct task_struct *task)
75{
76}
77
79extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 78extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
80 79
81static inline void prepare_to_copy(struct task_struct *tsk) 80static inline void prepare_to_copy(struct task_struct *tsk)
@@ -125,8 +124,7 @@ extern struct cpuinfo_um cpu_data[];
125#endif 124#endif
126 125
127 126
128#define KSTK_REG(tsk, reg) \ 127#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
129 get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf)
130#define get_wchan(p) (0) 128#define get_wchan(p) (0)
131 129
132#endif 130#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 @@
12#include "sysdep/ptrace.h" 12#include "sysdep/ptrace.h"
13 13
14struct pt_regs { 14struct pt_regs {
15 union uml_pt_regs regs; 15 struct uml_pt_regs regs;
16}; 16};
17 17
18#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS } 18#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
@@ -44,7 +44,7 @@ extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
44 44
45extern void show_regs(struct pt_regs *regs); 45extern void show_regs(struct pt_regs *regs);
46 46
47extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs, 47extern void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
48 int error_code); 48 int error_code);
49 49
50extern int arch_copy_tls(struct task_struct *new); 50extern 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,
46extern int ptrace_set_thread_area(struct task_struct *child, int idx, 46extern int ptrace_set_thread_area(struct task_struct *child, int idx,
47 struct user_desc __user *user_desc); 47 struct user_desc __user *user_desc);
48 48
49extern int do_set_thread_area_skas(struct user_desc *info);
50extern int do_get_thread_area_skas(struct user_desc *info);
51
52extern int do_set_thread_area_tt(struct user_desc *info);
53extern int do_get_thread_area_tt(struct user_desc *info);
54
55extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to);
56extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to);
57
58extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to);
59extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to);
60
61extern int do_get_thread_area_skas(struct user_desc *info);
62extern int do_set_thread_area_skas(struct user_desc *info);
63
64struct task_struct;
65
66#endif 49#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,
76 return -ENOSYS; 76 return -ENOSYS;
77} 77}
78 78
79static inline void arch_switch_to_tt(struct task_struct *from, 79extern long arch_prctl(struct task_struct *task, int code,
80 struct task_struct *to) 80 unsigned long __user *addr);
81{
82}
83
84extern void arch_switch_to_skas(struct task_struct *from,
85 struct task_struct *to);
86
87extern long arch_prctl_skas(struct task_struct *task, int code,
88 unsigned long __user *addr);
89
90#endif 81#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);
24extern void flush_tlb_mm(struct mm_struct *mm); 24extern void flush_tlb_mm(struct mm_struct *mm);
25extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 25extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
26 unsigned long end); 26 unsigned long end);
27extern void flush_tlb_page_skas(struct vm_area_struct *vma, 27extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long address);
28 unsigned long address);
29
30static inline void flush_tlb_page(struct vm_area_struct *vma,
31 unsigned long address)
32{
33 address &= PAGE_MASK;
34
35 flush_tlb_page_skas(vma, address);
36}
37
38extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
39extern void flush_tlb_kernel_vm(void); 28extern void flush_tlb_kernel_vm(void);
40extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); 29extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
41extern void __flush_tlb_one(unsigned long addr); 30extern void __flush_tlb_one(unsigned long addr);