diff options
Diffstat (limited to 'arch/um/kernel/skas/mmu.c')
-rw-r--r-- | arch/um/kernel/skas/mmu.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c new file mode 100644 index 000000000000..6cb9a6d028a9 --- /dev/null +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/sched.h" | ||
7 | #include "linux/list.h" | ||
8 | #include "linux/spinlock.h" | ||
9 | #include "linux/slab.h" | ||
10 | #include "asm/current.h" | ||
11 | #include "asm/segment.h" | ||
12 | #include "asm/mmu.h" | ||
13 | #include "os.h" | ||
14 | #include "skas.h" | ||
15 | |||
16 | int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | ||
17 | { | ||
18 | int from; | ||
19 | |||
20 | if((current->mm != NULL) && (current->mm != &init_mm)) | ||
21 | from = current->mm->context.skas.mm_fd; | ||
22 | else from = -1; | ||
23 | |||
24 | mm->context.skas.mm_fd = new_mm(from); | ||
25 | if(mm->context.skas.mm_fd < 0){ | ||
26 | printk("init_new_context_skas - new_mm failed, errno = %d\n", | ||
27 | mm->context.skas.mm_fd); | ||
28 | return(mm->context.skas.mm_fd); | ||
29 | } | ||
30 | |||
31 | return(0); | ||
32 | } | ||
33 | |||
34 | void destroy_context_skas(struct mm_struct *mm) | ||
35 | { | ||
36 | os_close_file(mm->context.skas.mm_fd); | ||
37 | } | ||
38 | |||
39 | /* | ||
40 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
41 | * Emacs will notice this stuff at the end of the file and automatically | ||
42 | * adjust the settings for this buffer only. This must remain at the end | ||
43 | * of the file. | ||
44 | * --------------------------------------------------------------------------- | ||
45 | * Local variables: | ||
46 | * c-file-style: "linux" | ||
47 | * End: | ||
48 | */ | ||