diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-05-09 08:36:08 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-19 16:11:29 +0300 |
commit | 5b89492c03e5c0a2c259b97d7d4c1bb9b02860aa (patch) | |
tree | f9259251f6cc80b61553491a47e413e9a3a7cf16 /arch/powerpc/kernel/fadump.c | |
parent | 7d40aff8213c92e64a1576ba9dfebcd201c0564d (diff) | |
download | linux-5b89492c03e5c0a2c259b97d7d4c1bb9b02860aa.tar.xz |
powerpc: Finalise cleanup around ABI use
Now that we have CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2,
get rid of all indirect detection of ABI version.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/709d9d69523c14c8a9fba4486395dca0f2d675b1.1652074503.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/fadump.c')
-rw-r--r-- | arch/powerpc/kernel/fadump.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index bfb671fe904b..a171d0f6621d 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -978,11 +978,14 @@ static int fadump_init_elfcore_header(char *bufp) elf->e_entry = 0; elf->e_phoff = sizeof(struct elfhdr); elf->e_shoff = 0; -#if defined(_CALL_ELF) - elf->e_flags = _CALL_ELF; -#else - elf->e_flags = 0; -#endif + + if (IS_ENABLED(CONFIG_PPC64_ELF_ABI_V2)) + elf->e_flags = 2; + else if (IS_ENABLED(CONFIG_PPC64_ELF_ABI_V1)) + elf->e_flags = 1; + else + elf->e_flags = 0; + elf->e_ehsize = sizeof(struct elfhdr); elf->e_phentsize = sizeof(struct elf_phdr); elf->e_phnum = 0; |