Thread (7 messages) 7 messages, 2 authors, 2021-02-12

Re: Fwd: Re: [PATCH v17 02/10] of: Add a common kexec FDT setup function

From: Lakshmi Ramasubramanian <hidden>
Date: 2021-02-12 01:10:58
Also in: linux-arm-kernel, linux-integrity

Possibly related (same subject, not in this thread)

On 2/11/21 3:59 PM, Thiago Jung Bauermann wrote:
Lakshmi Ramasubramanian [off-list ref] writes:
quoted
On 2/11/21 9:42 AM, Lakshmi Ramasubramanian wrote:
quoted
Hi Rob,
[PATCH] powerpc: Rename kexec elfcorehdr_addr to elf_headers_mem
This change causes build problem for x86_64 architecture (please see the
mail from kernel test bot below) since arch/x86/include/asm/kexec.h uses
"elf_load_addr" for the ELF header buffer address and not
"elf_headers_mem".
struct kimage_arch {
      ...
      /* Core ELF header buffer */
      void *elf_headers;
      unsigned long elf_headers_sz;
      unsigned long elf_load_addr;
};
I am thinking of limiting of_kexec_alloc_and_setup_fdt() to ARM64 and
PPC64 since they are the only ones using this function now.
#if defined(CONFIG_ARM64) && defined(CONFIG_PPC64)
Sorry - I meant to say
#if defined(CONFIG_ARM64) || defined(CONFIG_PPC64)
Does it build correctly if you rename elf_headers_mem to elf_load_addr?
Or the other way around, renaming x86's elf_load_addr to
elf_headers_mem. I don't really have a preference.
Yes - changing arm64 and ppc from "elf_headers_mem" to "elf_load_addr" 
builds fine.

But I am concerned about a few other architectures that also define 
"struct kimage_arch" such as "parisc", "arm" which do not have any ELF 
related fields. They would not build if the config defines 
CONFIG_KEXEC_FILE and CONFIG_OF_FLATTREE.

Do you think that could be an issue?

thanks,
  -lakshmi
That would be better than adding an #if condition.
quoted
quoted
void *of_kexec_alloc_and_setup_fdt(const struct kimage *image,
                     unsigned long initrd_load_addr,
                     unsigned long initrd_len,
                     const char *cmdline)
{
      ...
}
#endif /* defined(CONFIG_ARM64) && defined(CONFIG_PPC64) */
Please let me know if you have any concerns.
thanks,
   -lakshmi
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help