aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/process_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/process_kern.c')
-rw-r--r--arch/um/kernel/process_kern.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index 7a943696f950..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
118void 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
128void set_current(void *t) 118void 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
153void exit_thread(void) 143void 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
@@ -476,12 +465,21 @@ int singlestepping(void * t)
476 return 2; 465 return 2;
477} 466}
478 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
479unsigned long arch_align_stack(unsigned long sp) 476unsigned long arch_align_stack(unsigned long sp)
480{ 477{
481 if (randomize_va_space) 478 if (randomize_va_space)
482 sp -= get_random_int() % 8192; 479 sp -= get_random_int() % 8192;
483 return sp & ~0xf; 480 return sp & ~0xf;
484} 481}
482#endif
485 483
486 484
487/* 485/*