diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-um/mmu_context.h | 20 | ||||
-rw-r--r-- | include/asm-um/processor-generic.h | 16 | ||||
-rw-r--r-- | include/asm-um/ptrace-generic.h | 4 | ||||
-rw-r--r-- | include/asm-um/ptrace-i386.h | 17 | ||||
-rw-r--r-- | include/asm-um/ptrace-x86_64.h | 13 | ||||
-rw-r--r-- | include/asm-um/tlbflush.h | 13 |
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 | ||
35 | 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, |
@@ -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 | ||
53 | extern int init_new_context_skas(struct task_struct *task, | 53 | extern int init_new_context(struct task_struct *task, struct mm_struct *mm); |
54 | struct mm_struct *mm); | ||
55 | 54 | ||
56 | static inline int init_new_context(struct task_struct *task, | 55 | extern void destroy_context(struct mm_struct *mm); |
57 | struct mm_struct *mm) | ||
58 | { | ||
59 | return(init_new_context_skas(task, mm)); | ||
60 | } | ||
61 | |||
62 | extern void destroy_context_skas(struct mm_struct *mm); | ||
63 | |||
64 | static 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 | ||
76 | extern struct task_struct *alloc_task_struct(void); | 72 | extern struct task_struct *alloc_task_struct(void); |
77 | 73 | ||
78 | extern void release_thread(struct task_struct *); | 74 | static inline void release_thread(struct task_struct *task) |
75 | { | ||
76 | } | ||
77 | |||
79 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 78 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
80 | 79 | ||
81 | static inline void prepare_to_copy(struct task_struct *tsk) | 80 | static 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 | ||
14 | struct pt_regs { | 14 | struct 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 | ||
45 | extern void show_regs(struct pt_regs *regs); | 45 | extern void show_regs(struct pt_regs *regs); |
46 | 46 | ||
47 | extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs, | 47 | extern void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, |
48 | int error_code); | 48 | int error_code); |
49 | 49 | ||
50 | extern int arch_copy_tls(struct task_struct *new); | 50 | 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, | |||
46 | extern int ptrace_set_thread_area(struct task_struct *child, int idx, | 46 | extern 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 | ||
49 | extern int do_set_thread_area_skas(struct user_desc *info); | ||
50 | extern int do_get_thread_area_skas(struct user_desc *info); | ||
51 | |||
52 | extern int do_set_thread_area_tt(struct user_desc *info); | ||
53 | extern int do_get_thread_area_tt(struct user_desc *info); | ||
54 | |||
55 | extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); | ||
56 | extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); | ||
57 | |||
58 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | ||
59 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | ||
60 | |||
61 | extern int do_get_thread_area_skas(struct user_desc *info); | ||
62 | extern int do_set_thread_area_skas(struct user_desc *info); | ||
63 | |||
64 | struct 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 | ||
79 | static inline void arch_switch_to_tt(struct task_struct *from, | 79 | extern long arch_prctl(struct task_struct *task, int code, |
80 | struct task_struct *to) | 80 | unsigned long __user *addr); |
81 | { | ||
82 | } | ||
83 | |||
84 | extern void arch_switch_to_skas(struct task_struct *from, | ||
85 | struct task_struct *to); | ||
86 | |||
87 | extern 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); | |||
24 | extern void flush_tlb_mm(struct mm_struct *mm); | 24 | extern void flush_tlb_mm(struct mm_struct *mm); |
25 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | 25 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, |
26 | unsigned long end); | 26 | unsigned long end); |
27 | extern void flush_tlb_page_skas(struct vm_area_struct *vma, | 27 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long address); |
28 | unsigned long address); | ||
29 | |||
30 | static 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 | |||
38 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | ||
39 | extern void flush_tlb_kernel_vm(void); | 28 | extern void flush_tlb_kernel_vm(void); |
40 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | 29 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); |
41 | extern void __flush_tlb_one(unsigned long addr); | 30 | extern void __flush_tlb_one(unsigned long addr); |