Skip to content

Commit 9554e90

Browse files
Brian Gerstsuryasaimadhu
authored andcommitted
ELF: Remove elf_core_copy_kernel_regs()
x86-32 was the last architecture that implemented separate user and kernel registers. Signed-off-by: Brian Gerst <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Acked-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f5d9283 commit 9554e90

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

arch/powerpc/kernel/fadump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)
752752
* FIXME: How do i get PID? Do I really need it?
753753
* prstatus.pr_pid = ????
754754
*/
755-
elf_core_copy_kernel_regs(&prstatus.pr_reg, regs);
755+
elf_core_copy_regs(&prstatus.pr_reg, regs);
756756
buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS,
757757
&prstatus, sizeof(prstatus));
758758
return buf;

arch/powerpc/platforms/powernv/opal-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void __init fill_prstatus(struct elf_prstatus *prstatus, int pir,
112112
struct pt_regs *regs)
113113
{
114114
memset(prstatus, 0, sizeof(struct elf_prstatus));
115-
elf_core_copy_kernel_regs(&(prstatus->pr_reg), regs);
115+
elf_core_copy_regs(&(prstatus->pr_reg), regs);
116116

117117
/*
118118
* Overload PID with PIR value.

include/linux/elfcore.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re
8484
#endif
8585
}
8686

87-
static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
88-
{
89-
#ifdef ELF_CORE_COPY_KERNEL_REGS
90-
ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs);
91-
#else
92-
elf_core_copy_regs(elfregs, regs);
93-
#endif
94-
}
95-
9687
static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
9788
{
9889
#if defined (ELF_CORE_COPY_TASK_REGS)

kernel/kexec_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu)
10781078
return;
10791079
memset(&prstatus, 0, sizeof(prstatus));
10801080
prstatus.common.pr_pid = current->pid;
1081-
elf_core_copy_kernel_regs(&prstatus.pr_reg, regs);
1081+
elf_core_copy_regs(&prstatus.pr_reg, regs);
10821082
buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS,
10831083
&prstatus, sizeof(prstatus));
10841084
final_note(buf);

0 commit comments

Comments
 (0)