patch-2.1.100 linux/include/asm-alpha/mmu_context.h

Next file: linux/include/asm-arm/ide.h
Previous file: linux/include/asm-alpha/ide.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/include/asm-alpha/mmu_context.h linux/include/asm-alpha/mmu_context.h
@@ -109,8 +109,24 @@
 #endif
 }
 
-#define init_new_context(mm)	do { } while(0)
+extern inline void init_new_context(struct mm_struct *mm)
+{
+	mm->context = 0;
+}
+
 #define destroy_context(mm)	do { } while(0)
+
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ * Ideally this would be an extern inline function, but reload_context
+ * is declared in pgtable.h, which includes this file. :-(
+ */
+#define activate_context(tsk)		\
+	do {				\
+		get_mmu_context(tsk);	\
+		reload_context(tsk);	\
+	} while (0)
 
 #endif
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov