[RFC] [PATCH] task_pt_regs for powerpc systems

Srinivasa D S srinivasa at in.ibm.com
Tue Jul 8 00:22:27 EST 2008


Hi
 task_pt_regs() macro defines pt_regs for the given task,  this macro is  
currently not defined for powerpc arch. We need this macro for 
upcoming utrace features. 
 Below attached patch  defines this macro for powerpc arch. Please let 
me know your comments on this.

Signed-off-by: Srinivasa DS <srinivasa at in.ibm.com>


---
 include/asm-powerpc/processor.h |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6.26-rc9/include/asm-powerpc/processor.h
===================================================================
--- linux-2.6.26-rc9.orig/include/asm-powerpc/processor.h
+++ linux-2.6.26-rc9/include/asm-powerpc/processor.h
@@ -214,6 +214,8 @@ struct thread_struct {
 #define thread_saved_pc(tsk)    \
         ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
 
+#define task_pt_regs(tsk)	((struct pt_regs *)(tsk)->thread.regs)
+
 unsigned long get_wchan(struct task_struct *p);
 
 #define KSTK_EIP(tsk)  ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)



More information about the Linuxppc-dev mailing list