Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755982AbXJLCg5 (ORCPT ); Thu, 11 Oct 2007 22:36:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755688AbXJLCgf (ORCPT ); Thu, 11 Oct 2007 22:36:35 -0400 Received: from E23SMTP04.au.ibm.com ([202.81.18.173]:60687 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755524AbXJLCge (ORCPT ); Thu, 11 Oct 2007 22:36:34 -0400 Message-ID: <470EDD7D.8010509@au1.ibm.com> Date: Fri, 12 Oct 2007 12:35:41 +1000 From: Mark Nelson User-Agent: Thunderbird 2.0.0.6 (X11/20070809) MIME-Version: 1.0 To: Kumar Gala Cc: PowerPC dev list , Paul Mackerras , Linux Kernel Mailing List Subject: Re: [PATCH 1/2] [V2] Replace NT_PRXFPREG with ELF_CORE_XFPREG_TYPE #define References: <20071011071558.676463639@au1.ibm.com> <20071011072208.075979098@au1.ibm.com> <470ECFF7.9040008@au1.ibm.com> <470ED8BA.4010503@au1.ibm.com> In-Reply-To: <470ED8BA.4010503@au1.ibm.com> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5625 Lines: 146 Sorry for the patch noise but please disregard this patch - a line is longer than 80 characters and I'd hate to be brought up on that... V3 will be the perfect version then :) Thanks and apologies again! Mark. Mark Nelson wrote: > Replace NT_PRXFPREG with ELF_CORE_XFPREG_TYPE in the coredump code which > allows for more flexibility in the note type for the state of 'extended > floating point' implementations in coredumps. New note types can now be > added with an appropriate #define. > > This does #define ELF_CORE_XFPREG_TYPE to be NT_PRXFPREG in all > current users so there's are no change in behaviour. > > This will let us use different note types on powerpc for the > Altivec/VMX state that some PowerPC cpus have (G4, PPC970, POWER6) and > for the SPE (signal processing extension) state that some embedded > PowerPC cpus from Freescale have. > > Signed-off-by: Mark Nelson > --- > arch/ia64/ia32/elfcore32.h | 1 + > arch/x86_64/ia32/ia32_binfmt.c | 1 + > fs/binfmt_elf.c | 8 ++++---- > fs/binfmt_elf_fdpic.c | 6 +++--- > include/asm-i386/elf.h | 1 + > 5 files changed, 10 insertions(+), 7 deletions(-) > > Index: linux/arch/ia64/ia32/elfcore32.h > =================================================================== > --- linux.orig/arch/ia64/ia32/elfcore32.h > +++ linux/arch/ia64/ia32/elfcore32.h > @@ -117,6 +117,7 @@ elf_core_copy_task_fpregs(struct task_st > } > > #define ELF_CORE_COPY_XFPREGS 1 > +#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG > static inline int > elf_core_copy_task_xfpregs(struct task_struct *tsk, elf_fpxregset_t *xfpu) > { > Index: linux/arch/x86_64/ia32/ia32_binfmt.c > =================================================================== > --- linux.orig/arch/x86_64/ia32/ia32_binfmt.c > +++ linux/arch/x86_64/ia32/ia32_binfmt.c > @@ -188,6 +188,7 @@ elf_core_copy_task_fpregs(struct task_st > } > > #define ELF_CORE_COPY_XFPREGS 1 > +#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG > static inline int > elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) > { > Index: linux/fs/binfmt_elf.c > =================================================================== > --- linux.orig/fs/binfmt_elf.c > +++ linux/fs/binfmt_elf.c > @@ -1411,7 +1411,7 @@ struct elf_thread_status > elf_fpregset_t fpu; /* NT_PRFPREG */ > struct task_struct *thread; > #ifdef ELF_CORE_COPY_XFPREGS > - elf_fpxregset_t xfpu; /* NT_PRXFPREG */ > + elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */ > #endif > struct memelfnote notes[3]; > int num_notes; > @@ -1446,8 +1446,8 @@ static int elf_dump_thread_status(long s > > #ifdef ELF_CORE_COPY_XFPREGS > if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { > - fill_note(&t->notes[2], "LINUX", NT_PRXFPREG, sizeof(t->xfpu), > - &t->xfpu); > + fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE, > + sizeof(t->xfpu), &t->xfpu); > t->num_notes++; > sz += notesize(&t->notes[2]); > } > @@ -1624,7 +1624,7 @@ static int elf_core_dump(long signr, str > #ifdef ELF_CORE_COPY_XFPREGS > if (elf_core_copy_task_xfpregs(current, xfpu)) > fill_note(notes + numnote++, > - "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); > + "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu); > #endif > > fs = get_fs(); > Index: linux/fs/binfmt_elf_fdpic.c > =================================================================== > --- linux.orig/fs/binfmt_elf_fdpic.c > +++ linux/fs/binfmt_elf_fdpic.c > @@ -1417,7 +1417,7 @@ struct elf_thread_status > elf_fpregset_t fpu; /* NT_PRFPREG */ > struct task_struct *thread; > #ifdef ELF_CORE_COPY_XFPREGS > - elf_fpxregset_t xfpu; /* NT_PRXFPREG */ > + elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */ > #endif > struct memelfnote notes[3]; > int num_notes; > @@ -1453,7 +1453,7 @@ static int elf_dump_thread_status(long s > > #ifdef ELF_CORE_COPY_XFPREGS > if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { > - fill_note(&t->notes[2], "LINUX", NT_PRXFPREG, sizeof(t->xfpu), > + fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(t->xfpu), the line above is the offender... > &t->xfpu); > t->num_notes++; > sz += notesize(&t->notes[2]); > @@ -1690,7 +1690,7 @@ static int elf_fdpic_core_dump(long sign > #ifdef ELF_CORE_COPY_XFPREGS > if (elf_core_copy_task_xfpregs(current, xfpu)) > fill_note(notes + numnote++, > - "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); > + "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu); > #endif > > fs = get_fs(); > Index: linux/include/asm-i386/elf.h > =================================================================== > --- linux.orig/include/asm-i386/elf.h > +++ linux/include/asm-i386/elf.h > @@ -129,6 +129,7 @@ extern int dump_task_extended_fpu (struc > #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) > #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) > #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) > +#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG > > #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) > #define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso) > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/