summaryrefslogtreecommitdiffstats
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 7a94369..c1adf7b 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)
return(pid);
}
-void switch_mm(struct mm_struct *prev, struct mm_struct *next,
- struct task_struct *tsk)
-{
- int cpu = smp_processor_id();
-
- if (prev != next)
- cpu_clear(cpu, prev->cpu_vm_mask);
- cpu_set(cpu, next->cpu_vm_mask);
-}
-
void set_current(void *t)
{
struct task_struct *task = t;
@@ -152,7 +142,6 @@ void release_thread(struct task_struct *task)
void exit_thread(void)
{
- CHOOSE_MODE(exit_thread_tt(), exit_thread_skas());
unprotect_stack((unsigned long) current_thread);
}
@@ -476,12 +465,21 @@ int singlestepping(void * t)
return 2;
}
+/*
+ * Only x86 and x86_64 have an arch_align_stack().
+ * All other arches have "#define arch_align_stack(x) (x)"
+ * in their asm/system.h
+ * As this is included in UML from asm-um/system-generic.h,
+ * we can use it to behave as the subarch does.
+ */
+#ifndef arch_align_stack
unsigned long arch_align_stack(unsigned long sp)
{
if (randomize_va_space)
sp -= get_random_int() % 8192;
return sp & ~0xf;
}
+#endif
/*
OpenPOWER on IntegriCloud