summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/mmu_context.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
commit1a1d77dd589de5a567fa95e36aa6999c704ceca4 (patch)
tree141e31f89f18b9fe0831f31852e0435ceaccafc5 /include/asm-mips64/mmu_context.h
parentfb9c690a18b3d66925a65b17441c37fa14d4370b (diff)
Merge with 2.4.0-test7.
Diffstat (limited to 'include/asm-mips64/mmu_context.h')
-rw-r--r--include/asm-mips64/mmu_context.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/asm-mips64/mmu_context.h b/include/asm-mips64/mmu_context.h
index 0fe300bda..9979f0b3c 100644
--- a/include/asm-mips64/mmu_context.h
+++ b/include/asm-mips64/mmu_context.h
@@ -70,7 +70,7 @@ get_new_cpu_mmu_context(struct mm_struct *mm, unsigned long cpu)
* 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_new_context(struct task_struct *tsk, struct mm_struct *mm)
* 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,