summaryrefslogtreecommitdiff
path: root/arch/um/include/asm/mmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/include/asm/mmu.h')
-rw-r--r--arch/um/include/asm/mmu.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h
index 5b072aba5b65..07d48738b402 100644
--- a/arch/um/include/asm/mmu.h
+++ b/arch/um/include/asm/mmu.h
@@ -6,19 +6,27 @@
#ifndef __ARCH_UM_MMU_H
#define __ARCH_UM_MMU_H
+#include "linux/types.h"
+#include <linux/mutex.h>
+#include <linux/spinlock.h>
#include <mm_id.h>
-#include <asm/mm_context.h>
typedef struct mm_context {
struct mm_id id;
- struct uml_arch_mm_context arch;
- struct page *stub_pages[2];
-} mm_context_t;
+ struct mutex turnstile;
+
+ struct list_head list;
-extern void __switch_mm(struct mm_id * mm_idp);
+ /* Address range in need of a TLB sync */
+ spinlock_t sync_tlb_lock;
+ unsigned long sync_tlb_range_from;
+ unsigned long sync_tlb_range_to;
+} mm_context_t;
-/* Avoid tangled inclusion with asm/ldt.h */
-extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
-extern void free_ldt(struct mm_context *mm);
+#define INIT_MM_CONTEXT(mm) \
+ .context = { \
+ .turnstile = __MUTEX_INITIALIZER(mm.context.turnstile), \
+ .sync_tlb_lock = __SPIN_LOCK_INITIALIZER(mm.context.sync_tlb_lock), \
+ }
#endif