blob: 8855d8df512f6877a1e6d1534edbc29bd9275bbd [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Jeff Dikeae2587e2007-10-16 01:26:57 -07002 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Licensed under the GPL
4 */
5
6#ifndef __ARCH_UM_MMU_H
7#define __ARCH_UM_MMU_H
8
9#include "uml-config.h"
Jeff Dike6c738ff2007-10-16 01:27:06 -070010#include "mm_id.h"
11#include "asm/ldt.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Jeff Dike6c738ff2007-10-16 01:27:06 -070013typedef struct mm_context {
14 struct mm_id id;
15 unsigned long last_page_table;
16#ifdef CONFIG_3_LEVEL_PGTABLES
17 unsigned long last_pmd;
18#endif
19 struct uml_ldt ldt;
Linus Torvalds1da177e2005-04-16 15:20:36 -070020} mm_context_t;
21
Jeff Dike6c738ff2007-10-16 01:27:06 -070022extern void __switch_mm(struct mm_id * mm_idp);
23
24/* Avoid tangled inclusion with asm/ldt.h */
25extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
26extern void free_ldt(struct mm_context *mm);
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#endif