aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/skas/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/skas/process.c')
-rw-r--r--arch/um/kernel/skas/process.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c
index dabae62d52be..9ce1c49421f8 100644
--- a/arch/um/kernel/skas/process.c
+++ b/arch/um/kernel/skas/process.c
@@ -1,36 +1,23 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/sched.h"
7#include "linux/slab.h"
8#include "linux/ptrace.h"
9#include "linux/proc_fs.h"
10#include "linux/file.h"
11#include "linux/errno.h"
12#include "linux/init.h" 6#include "linux/init.h"
13#include "asm/uaccess.h" 7#include "linux/sched.h"
14#include "asm/atomic.h"
15#include "kern_util.h"
16#include "as-layout.h" 8#include "as-layout.h"
17#include "skas.h"
18#include "os.h" 9#include "os.h"
19#include "tlb.h" 10#include "skas.h"
20#include "kern.h"
21#include "registers.h"
22
23extern void schedule_tail(struct task_struct *prev);
24 11
25int new_mm(unsigned long stack) 12int new_mm(unsigned long stack)
26{ 13{
27 int fd; 14 int fd;
28 15
29 fd = os_open_file("/proc/mm", of_cloexec(of_write(OPENFLAGS())), 0); 16 fd = os_open_file("/proc/mm", of_cloexec(of_write(OPENFLAGS())), 0);
30 if(fd < 0) 17 if (fd < 0)
31 return fd; 18 return fd;
32 19
33 if(skas_needs_stub) 20 if (skas_needs_stub)
34 map_stub_pages(fd, CONFIG_STUB_CODE, CONFIG_STUB_DATA, stack); 21 map_stub_pages(fd, CONFIG_STUB_CODE, CONFIG_STUB_DATA, stack);
35 22
36 return fd; 23 return fd;
@@ -62,7 +49,7 @@ int __init start_uml(void)
62{ 49{
63 stack_protections((unsigned long) &cpu0_irqstack); 50 stack_protections((unsigned long) &cpu0_irqstack);
64 set_sigstack(cpu0_irqstack, THREAD_SIZE); 51 set_sigstack(cpu0_irqstack, THREAD_SIZE);
65 if(proc_mm) 52 if (proc_mm)
66 userspace_pid[0] = start_userspace(0); 53 userspace_pid[0] = start_userspace(0);
67 54
68 init_new_thread_signals(); 55 init_new_thread_signals();
@@ -75,7 +62,7 @@ int __init start_uml(void)
75 62
76unsigned long current_stub_stack(void) 63unsigned long current_stub_stack(void)
77{ 64{
78 if(current->mm == NULL) 65 if (current->mm == NULL)
79 return 0; 66 return 0;
80 67
81 return current->mm->context.skas.id.stack; 68 return current->mm->context.skas.id.stack;