From 4ae05adc15e1597f6de9783d53a872abb7314398 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 9 Feb 2009 22:17:39 +0900 Subject: [PATCH] --- yaml --- r: 136753 b: refs/heads/master c: 6cd61c0baa8bce32271226198b46c67a7a05d108 h: refs/heads/master i: 136751: 03371c79f83add08c0711a4f956a58392f0d37fa v: v3 --- [refs] | 2 +- trunk/include/linux/elfcore.h | 9 +++++++++ trunk/kernel/kexec.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 3bc3f35de1fc..9cdd5f9228d5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92e2d508464b6293ad274fb606f766a458894142 +refs/heads/master: 6cd61c0baa8bce32271226198b46c67a7a05d108 diff --git a/trunk/include/linux/elfcore.h b/trunk/include/linux/elfcore.h index 5ca54d77079f..7605c5e9589f 100644 --- a/trunk/include/linux/elfcore.h +++ b/trunk/include/linux/elfcore.h @@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re #endif } +static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs) +{ +#ifdef ELF_CORE_COPY_KERNEL_REGS + ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs); +#else + elf_core_copy_regs(elfregs, regs); +#endif +} + static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) { #ifdef ELF_CORE_COPY_TASK_REGS diff --git a/trunk/kernel/kexec.c b/trunk/kernel/kexec.c index 8a6d7b08864e..795e7b67a228 100644 --- a/trunk/kernel/kexec.c +++ b/trunk/kernel/kexec.c @@ -1130,7 +1130,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu) return; memset(&prstatus, 0, sizeof(prstatus)); prstatus.pr_pid = current->pid; - elf_core_copy_regs(&prstatus.pr_reg, regs); + elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, &prstatus, sizeof(prstatus)); final_note(buf);