patch-2.4.8 linux/include/asm-ppc/processor.h

Next file: linux/include/asm-s390/atomic.h
Previous file: linux/include/asm-ia64/unwind.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.7/linux/include/asm-ppc/processor.h linux/include/asm-ppc/processor.h
@@ -631,7 +631,7 @@
 #define INIT_THREAD  { \
 	INIT_SP, /* ksp */ \
 	0, /* wchan */ \
-	(struct pt_regs *)INIT_SP - 1, /* regs */ \
+	0, /* regs */ \
 	KERNEL_DS, /*fs*/ \
 	swapper_pg_dir, /* pgdir */ \
 	0, /* last_syscall */ \
@@ -659,8 +659,8 @@
 
 unsigned long get_wchan(struct task_struct *p);
 
-#define KSTK_EIP(tsk)  ((tsk)->thread.regs->nip)
-#define KSTK_ESP(tsk)  ((tsk)->thread.regs->gpr[1])
+#define KSTK_EIP(tsk)  ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
+#define KSTK_ESP(tsk)  ((tsk)->thread.regs? (tsk)->thread.regs->gpr[1]: 0)
 
 /*
  * NOTE! The task struct and the stack go together

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