diff options
Diffstat (limited to 'arch/um/kernel/process_kern.c')
-rw-r--r-- | arch/um/kernel/process_kern.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index 1d719d5b4bb9..c1adf7ba3fd1 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -115,16 +115,6 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
115 | return(pid); | 115 | return(pid); |
116 | } | 116 | } |
117 | 117 | ||
118 | void switch_mm(struct mm_struct *prev, struct mm_struct *next, | ||
119 | struct task_struct *tsk) | ||
120 | { | ||
121 | int cpu = smp_processor_id(); | ||
122 | |||
123 | if (prev != next) | ||
124 | cpu_clear(cpu, prev->cpu_vm_mask); | ||
125 | cpu_set(cpu, next->cpu_vm_mask); | ||
126 | } | ||
127 | |||
128 | void set_current(void *t) | 118 | void set_current(void *t) |
129 | { | 119 | { |
130 | struct task_struct *task = t; | 120 | struct task_struct *task = t; |
@@ -152,7 +142,6 @@ void release_thread(struct task_struct *task) | |||
152 | 142 | ||
153 | void exit_thread(void) | 143 | void exit_thread(void) |
154 | { | 144 | { |
155 | CHOOSE_MODE(exit_thread_tt(), exit_thread_skas()); | ||
156 | unprotect_stack((unsigned long) current_thread); | 145 | unprotect_stack((unsigned long) current_thread); |
157 | } | 146 | } |
158 | 147 | ||
@@ -161,10 +150,6 @@ void *get_current(void) | |||
161 | return(current); | 150 | return(current); |
162 | } | 151 | } |
163 | 152 | ||
164 | void prepare_to_copy(struct task_struct *tsk) | ||
165 | { | ||
166 | } | ||
167 | |||
168 | int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | 153 | int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, |
169 | unsigned long stack_top, struct task_struct * p, | 154 | unsigned long stack_top, struct task_struct * p, |
170 | struct pt_regs *regs) | 155 | struct pt_regs *regs) |
@@ -480,12 +465,21 @@ int singlestepping(void * t) | |||
480 | return 2; | 465 | return 2; |
481 | } | 466 | } |
482 | 467 | ||
468 | /* | ||
469 | * Only x86 and x86_64 have an arch_align_stack(). | ||
470 | * All other arches have "#define arch_align_stack(x) (x)" | ||
471 | * in their asm/system.h | ||
472 | * As this is included in UML from asm-um/system-generic.h, | ||
473 | * we can use it to behave as the subarch does. | ||
474 | */ | ||
475 | #ifndef arch_align_stack | ||
483 | unsigned long arch_align_stack(unsigned long sp) | 476 | unsigned long arch_align_stack(unsigned long sp) |
484 | { | 477 | { |
485 | if (randomize_va_space) | 478 | if (randomize_va_space) |
486 | sp -= get_random_int() % 8192; | 479 | sp -= get_random_int() % 8192; |
487 | return sp & ~0xf; | 480 | return sp & ~0xf; |
488 | } | 481 | } |
482 | #endif | ||
489 | 483 | ||
490 | 484 | ||
491 | /* | 485 | /* |