diff options
author | Mark Nelson <markn@au1.ibm.com> | 2007-10-17 02:25:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:44 -0400 |
commit | 5b20cd80b4ce1674b7abe5ac91db23346118176d (patch) | |
tree | d00339cce901048489f1ef0eedf23d57b6068234 /fs | |
parent | eead19115329c5615ba03cbaf1c3fe24c14858a3 (diff) |
x86: replace NT_PRXFPREG with ELF_CORE_XFPREG_TYPE #define
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 <markn@au1.ibm.com>
Cc: 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 'fs')
-rw-r--r-- | fs/binfmt_elf.c | 8 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f3037c645ca9..2f31c4c3fd48 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1411,7 +1411,7 @@ struct elf_thread_status | |||
1411 | elf_fpregset_t fpu; /* NT_PRFPREG */ | 1411 | elf_fpregset_t fpu; /* NT_PRFPREG */ |
1412 | struct task_struct *thread; | 1412 | struct task_struct *thread; |
1413 | #ifdef ELF_CORE_COPY_XFPREGS | 1413 | #ifdef ELF_CORE_COPY_XFPREGS |
1414 | elf_fpxregset_t xfpu; /* NT_PRXFPREG */ | 1414 | elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */ |
1415 | #endif | 1415 | #endif |
1416 | struct memelfnote notes[3]; | 1416 | struct memelfnote notes[3]; |
1417 | int num_notes; | 1417 | int num_notes; |
@@ -1446,8 +1446,8 @@ static int elf_dump_thread_status(long signr, struct elf_thread_status *t) | |||
1446 | 1446 | ||
1447 | #ifdef ELF_CORE_COPY_XFPREGS | 1447 | #ifdef ELF_CORE_COPY_XFPREGS |
1448 | if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { | 1448 | if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { |
1449 | fill_note(&t->notes[2], "LINUX", NT_PRXFPREG, sizeof(t->xfpu), | 1449 | fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE, |
1450 | &t->xfpu); | 1450 | sizeof(t->xfpu), &t->xfpu); |
1451 | t->num_notes++; | 1451 | t->num_notes++; |
1452 | sz += notesize(&t->notes[2]); | 1452 | sz += notesize(&t->notes[2]); |
1453 | } | 1453 | } |
@@ -1621,7 +1621,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
1621 | #ifdef ELF_CORE_COPY_XFPREGS | 1621 | #ifdef ELF_CORE_COPY_XFPREGS |
1622 | if (elf_core_copy_task_xfpregs(current, xfpu)) | 1622 | if (elf_core_copy_task_xfpregs(current, xfpu)) |
1623 | fill_note(notes + numnote++, | 1623 | fill_note(notes + numnote++, |
1624 | "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); | 1624 | "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu); |
1625 | #endif | 1625 | #endif |
1626 | 1626 | ||
1627 | fs = get_fs(); | 1627 | fs = get_fs(); |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index c5ca2f0aca7f..faae02189598 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1417,7 +1417,7 @@ struct elf_thread_status | |||
1417 | elf_fpregset_t fpu; /* NT_PRFPREG */ | 1417 | elf_fpregset_t fpu; /* NT_PRFPREG */ |
1418 | struct task_struct *thread; | 1418 | struct task_struct *thread; |
1419 | #ifdef ELF_CORE_COPY_XFPREGS | 1419 | #ifdef ELF_CORE_COPY_XFPREGS |
1420 | elf_fpxregset_t xfpu; /* NT_PRXFPREG */ | 1420 | elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */ |
1421 | #endif | 1421 | #endif |
1422 | struct memelfnote notes[3]; | 1422 | struct memelfnote notes[3]; |
1423 | int num_notes; | 1423 | int num_notes; |
@@ -1453,8 +1453,8 @@ static int elf_dump_thread_status(long signr, struct elf_thread_status *t) | |||
1453 | 1453 | ||
1454 | #ifdef ELF_CORE_COPY_XFPREGS | 1454 | #ifdef ELF_CORE_COPY_XFPREGS |
1455 | if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { | 1455 | if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { |
1456 | fill_note(&t->notes[2], "LINUX", NT_PRXFPREG, sizeof(t->xfpu), | 1456 | fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE, |
1457 | &t->xfpu); | 1457 | sizeof(t->xfpu), &t->xfpu); |
1458 | t->num_notes++; | 1458 | t->num_notes++; |
1459 | sz += notesize(&t->notes[2]); | 1459 | sz += notesize(&t->notes[2]); |
1460 | } | 1460 | } |
@@ -1690,7 +1690,7 @@ static int elf_fdpic_core_dump(long signr, struct pt_regs *regs, | |||
1690 | #ifdef ELF_CORE_COPY_XFPREGS | 1690 | #ifdef ELF_CORE_COPY_XFPREGS |
1691 | if (elf_core_copy_task_xfpregs(current, xfpu)) | 1691 | if (elf_core_copy_task_xfpregs(current, xfpu)) |
1692 | fill_note(notes + numnote++, | 1692 | fill_note(notes + numnote++, |
1693 | "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); | 1693 | "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu); |
1694 | #endif | 1694 | #endif |
1695 | 1695 | ||
1696 | fs = get_fs(); | 1696 | fs = get_fs(); |