summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/processor.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-09 06:20:52 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-09 06:20:52 +0000
commit0b898e7acdab77a9eb047edf7235cb25151ee6da (patch)
treee297c006a447dd9b6869754f8f201b5330a02da1 /include/asm-mips/processor.h
parenta2320c942ccf93dc1c72869f91829e7779e50ee6 (diff)
Fix a couple of bug related to the new handling of the stack and the
current pointer.
Diffstat (limited to 'include/asm-mips/processor.h')
-rw-r--r--include/asm-mips/processor.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index 0c47c2580..c4c0e849b 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -164,11 +164,15 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long
#define USES_USER_TIME(regs) (!((regs)->cp0_status & 0x18))
/* Allocation and freeing of basic task resources. */
-#define alloc_task_struct() kmalloc(sizeof(struct task_struct), GFP_KERNEL)
-#define free_task_struct(p) kfree(p)
+/*
+ * NOTE! The task struct and the stack go together
+ */
+#define alloc_task_struct() \
+ ((struct task_struct *) __get_free_pages(GFP_KERNEL,1,0))
+#define free_task_struct(p) free_pages((unsigned long)(p),1)
-#define init_task (init_task_union.task)
-#define init_stack (init_task_union.stack)
+#define init_task (init_task_union.task)
+#define init_stack (init_task_union.stack)
#endif /* !defined (__LANGUAGE_ASSEMBLY__) */
#endif /* __KERNEL__ */