[v18,02/11] arm64: Rename kexec elf_headers_mem to elf_load_addr
diff mbox series

Message ID 20210213161049.6190-3-nramas@linux.microsoft.com
State In Next
Commit 7416a82ec66b6343b15144cd71c00a8e924fcbe5
Headers show
Series
  • Carry forward IMA measurement log on kexec on ARM64
Related show

Commit Message

Lakshmi Ramasubramanian Feb. 13, 2021, 4:10 p.m. UTC
The architecture specific field, elf_headers_mem in struct kimage_arch,
that holds the address of the buffer in memory for ELF core header for
arm64 has a different name than the one used for powerpc.  This makes
it hard to have a common code for setting up the device tree for
kexec system call.

Rename elf_headers_mem to elf_load_addr to align with powerpc name so
common code can use it.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
---
 arch/arm64/include/asm/kexec.h         | 2 +-
 arch/arm64/kernel/machine_kexec_file.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Thiago Jung Bauermann Feb. 15, 2021, 9:34 p.m. UTC | #1
Lakshmi Ramasubramanian <nramas@linux.microsoft.com> writes:

> The architecture specific field, elf_headers_mem in struct kimage_arch,
> that holds the address of the buffer in memory for ELF core header for
> arm64 has a different name than the one used for powerpc.  This makes
> it hard to have a common code for setting up the device tree for
> kexec system call.
>
> Rename elf_headers_mem to elf_load_addr to align with powerpc name so
> common code can use it.
>
> Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
> Suggested-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> ---
>  arch/arm64/include/asm/kexec.h         | 2 +-
>  arch/arm64/kernel/machine_kexec_file.c | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>

Patch
diff mbox series

diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h
index d24b527e8c00..e6a99dfdffb8 100644
--- a/arch/arm64/include/asm/kexec.h
+++ b/arch/arm64/include/asm/kexec.h
@@ -98,7 +98,7 @@  struct kimage_arch {
 	unsigned long dtb_mem;
 	/* Core ELF header buffer */
 	void *elf_headers;
-	unsigned long elf_headers_mem;
+	unsigned long elf_load_addr;
 	unsigned long elf_headers_sz;
 };
 
diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c
index 03210f644790..d98bacec9426 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -73,7 +73,7 @@  static int setup_dtb(struct kimage *image,
 		/* add linux,elfcorehdr */
 		ret = fdt_appendprop_addrrange(dtb, 0, off,
 				FDT_PROP_KEXEC_ELFHDR,
-				image->arch.elf_headers_mem,
+				image->arch.elf_load_addr,
 				image->arch.elf_headers_sz);
 		if (ret)
 			return (ret == -FDT_ERR_NOSPACE ? -ENOMEM : -EINVAL);
@@ -283,11 +283,11 @@  int load_other_segments(struct kimage *image,
 			goto out_err;
 		}
 		image->arch.elf_headers = headers;
-		image->arch.elf_headers_mem = kbuf.mem;
+		image->arch.elf_load_addr = kbuf.mem;
 		image->arch.elf_headers_sz = headers_sz;
 
 		pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
-			 image->arch.elf_headers_mem, kbuf.bufsz, kbuf.memsz);
+			 image->arch.elf_load_addr, kbuf.bufsz, kbuf.memsz);
 	}
 
 	/* load initrd */