diff options
author | Yong Zhang <yong.zhang@windriver.com> | 2009-06-30 21:35:39 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-07-03 10:45:27 -0400 |
commit | cad9bc69048b073023366ebb0878c1dd64a2c4d9 (patch) | |
tree | 1f524589c15cf75da217ed7b9b9b4686c3f714e9 /arch/mips/include/asm/reg.h | |
parent | ea4bbfd0048c53c24f72ef668b39f1247bc243c0 (diff) |
MIPS: 64-bit: Fix o32 core dump
If an o32 process generates a core dump on a 64 bit kernel, the core file
will not be correctly recognized. This is because ELF_CORE_COPY_REGS and
ELF_CORE_COPY_TASK_REGS are not correctly defined for o32 and will use
the default register set which would be CONFIG_64BIT in asm/elf.h.
So we'll switch to use the right register defines in this situation by
checking for WANT_COMPAT_REG_H and use the right defines of
ELF_CORE_COPY_REGS and ELF_CORE_COPY_TASK_REGS.
[Ralf: made ELF_CORE_COPY_TASK_REGS() bullet-proof against funny arguments.]
Signed-off-by: Yong Zhang <yong.zhang@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/reg.h')
-rw-r--r-- | arch/mips/include/asm/reg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/reg.h b/arch/mips/include/asm/reg.h index 634b55d7e7f6..910e71a12466 100644 --- a/arch/mips/include/asm/reg.h +++ b/arch/mips/include/asm/reg.h | |||
@@ -69,7 +69,7 @@ | |||
69 | 69 | ||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #ifdef CONFIG_64BIT | 72 | #if defined(CONFIG_64BIT) && !defined(WANT_COMPAT_REG_H) |
73 | 73 | ||
74 | #define EF_R0 0 | 74 | #define EF_R0 0 |
75 | #define EF_R1 1 | 75 | #define EF_R1 1 |