patch-2.1.37 linux/arch/alpha/kernel/process.c

Next file: linux/arch/alpha/kernel/ptrace.c
Previous file: linux/arch/alpha/kernel/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
@@ -37,6 +37,24 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <asm/pgtable.h>
+
+/*
+ * Initial task structure. Make this a per-architecture thing,
+ * because different architectures tend to have different
+ * alignment requirements and potentially different initial
+ * setup.
+ */
+
+unsigned long init_user_stack[1024] = { STACK_MAGIC, };
+static struct vm_area_struct init_mmap = INIT_MMAP;
+static struct fs_struct init_fs = INIT_FS;
+static struct files_struct init_files = INIT_FILES;
+static struct signal_struct init_signals = INIT_SIGNALS;
+struct mm_struct init_mm = INIT_MM;
+
+union task_union init_task_union __attribute__((section("init_task")))
+	 = { task: INIT_TASK };
 
 /*
  * No need to acquire the kernel lock, we're entirely local..
@@ -186,7 +204,7 @@
 	stack_offset = PAGE_SIZE - sizeof(struct pt_regs);
 	if (!(regs->ps & 8))
 		stack_offset = (PAGE_SIZE-1) & (unsigned long) regs;
-	childregs = (struct pt_regs *) (p->kernel_stack_page + stack_offset);
+	childregs = (struct pt_regs *) (stack_offset + PAGE_SIZE + (unsigned long)p);
 		
 	*childregs = *regs;
 	childregs->r0 = 0;

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