aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Nelson <markn@au1.ibm.com>2007-10-17 02:25:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:44 -0400
commit1f7d6668c29b1dfa307a44844f9bb38356fc989b (patch)
tree7e8feb874806710834619756dba698cd2697cd1f /include
parent5b20cd80b4ce1674b7abe5ac91db23346118176d (diff)
powerpc: add Altivec/VMX state to coredumps
Update dump_task_altivec() (which has so far never been put to use) so that it dumps the Altivec/VMX registers (VR[0] - VR[31], VSCR and VRSAVE) in the same format as the ptrace get_vrregs(), and add the appropriate glue typedef and #defines to make it work. A new note type of NT_PPC_VMX was chosen to be 0x100 (arbitrarily) because it allows the low range values to be used for more generic purposes and 0x100 seems an adequate starting point for PowerPC extensions. Signed-off-by: Mark Nelson <markn@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <ak@suse.de> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/elf.h8
-rw-r--r--include/linux/elf.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h
index e42820d6d25b..5b9e3f41d649 100644
--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -212,6 +212,14 @@ static inline int dump_task_regs(struct task_struct *tsk,
212extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); 212extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
213#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) 213#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
214 214
215typedef elf_vrregset_t elf_fpxregset_t;
216
217#ifdef CONFIG_ALTIVEC
218extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs);
219#define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_altivec(tsk, regs)
220#define ELF_CORE_XFPREG_TYPE NT_PPC_VMX
221#endif
222
215#endif /* __KERNEL__ */ 223#endif /* __KERNEL__ */
216 224
217/* ELF_HWCAP yields a mask that user programs can use to figure out what 225/* ELF_HWCAP yields a mask that user programs can use to figure out what
diff --git a/include/linux/elf.h b/include/linux/elf.h
index d2da84acf45d..0eb9ed2f4189 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -355,6 +355,7 @@ typedef struct elf64_shdr {
355#define NT_TASKSTRUCT 4 355#define NT_TASKSTRUCT 4
356#define NT_AUXV 6 356#define NT_AUXV 6
357#define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ 357#define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */
358#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
358 359
359 360
360/* Note header in a PT_NOTE section */ 361/* Note header in a PT_NOTE section */