Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / um / kernel / skas / mmu.c
blob6cb9a6d028a906cd8f51bd1a900b431de1c393b7
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
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"
16 int init_new_context_skas(struct task_struct *task, struct mm_struct *mm)
18 int from;
20 if((current->mm != NULL) && (current->mm != &init_mm))
21 from = current->mm->context.skas.mm_fd;
22 else from = -1;
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);
31 return(0);
34 void destroy_context_skas(struct mm_struct *mm)
36 os_close_file(mm->context.skas.mm_fd);
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: