소스 검색

powerpc: Implement task_pt_regs() accessor

The task_pt_regs() macro allows access to the pt_regs of a given task.

This macro is not currently defined for the powerpc architecture, but
we need it for some upcoming utrace additions.

Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Srinivasa Ds 17 년 전
부모
커밋
e5093ff05d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      include/asm-powerpc/processor.h

+ 2 - 0
include/asm-powerpc/processor.h

@@ -234,6 +234,8 @@ struct thread_struct {
 #define thread_saved_pc(tsk)    \
 #define thread_saved_pc(tsk)    \
         ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
         ((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);
 unsigned long get_wchan(struct task_struct *p);
 
 
 #define KSTK_EIP(tsk)  ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
 #define KSTK_EIP(tsk)  ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)