patch-2.4.0-test7 linux/include/asm-mips64/mmu_context.h

Next file: linux/include/asm-mips64/unistd.h
Previous file: linux/include/asm-mips/unistd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test6/linux/include/asm-mips64/mmu_context.h linux/include/asm-mips64/mmu_context.h
@@ -70,7 +70,7 @@
  * Initialize the context related info for a new mm_struct
  * instance.
  */
-extern inline void
+extern inline int
 init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
 #ifndef CONFIG_SMP
@@ -82,12 +82,11 @@
  	 * Init the "context" values so that a tlbpid allocation 
 	 * happens on the first switch.
  	 */
-	if (mm->context)
-		memset((void *)mm->context, 0, smp_num_cpus * 
-						sizeof(unsigned long));
-	else
-		printk("Warning: init_new_context failed\n");
+	if (mm->context == 0)
+		return -ENOMEM;
+	memset((void *)mm->context, 0, smp_num_cpus * sizeof(unsigned long));
 #endif
+	return 0;
 }
 
 extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)