From 1f7d6668c29b1dfa307a44844f9bb38356fc989b Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 16 Oct 2007 23:25:40 -0700 Subject: 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 Signed-off-by: Paul Mackerras Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-powerpc/elf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-powerpc/elf.h') 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, extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) +typedef elf_vrregset_t elf_fpxregset_t; + +#ifdef CONFIG_ALTIVEC +extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs); +#define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_altivec(tsk, regs) +#define ELF_CORE_XFPREG_TYPE NT_PPC_VMX +#endif + #endif /* __KERNEL__ */ /* ELF_HWCAP yields a mask that user programs can use to figure out what -- cgit v1.2.3