[linux-next:master 11617/11791] drivers/of/kexec.c:190:16: error: 'const struct kimage_arch' has no member named 'elf_load_addr'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ff90dfd2579b2c7bc1f0baa0cb99c918c6c1ec64
commit: 33488dc4d61f3affb54ecb46feaf0865444eb56a [11617/11791] of: Add a common kexec FDT setup function
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=33488dc4d61f3affb54ecb46feaf0865444eb56a
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 33488dc4d61f3affb54ecb46feaf0865444eb56a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the linux-next/master HEAD ff90dfd2579b2c7bc1f0baa0cb99c918c6c1ec64 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

   drivers/of/kexec.c: In function 'of_kexec_alloc_and_setup_fdt':
>> drivers/of/kexec.c:190:16: error: 'const struct kimage_arch' has no member named 'elf_load_addr'
     190 |     image->arch.elf_load_addr,
         |                ^
   drivers/of/kexec.c:191:16: error: 'const struct kimage_arch' has no member named 'elf_headers_sz'
     191 |     image->arch.elf_headers_sz);
         |                ^
   drivers/of/kexec.c:199:41: error: 'const struct kimage_arch' has no member named 'elf_load_addr'
     199 |   ret = fdt_add_mem_rsv(fdt, image->arch.elf_load_addr,
         |                                         ^
   drivers/of/kexec.c:200:22: error: 'const struct kimage_arch' has no member named 'elf_headers_sz'
     200 |           image->arch.elf_headers_sz);
         |                      ^


vim +190 drivers/of/kexec.c

    71	
    72	/*
    73	 * of_kexec_alloc_and_setup_fdt - Alloc and setup a new Flattened Device Tree
    74	 *
    75	 * @image:		kexec image being loaded.
    76	 * @initrd_load_addr:	Address where the next initrd will be loaded.
    77	 * @initrd_len:		Size of the next initrd, or 0 if there will be none.
    78	 * @cmdline:		Command line for the next kernel, or NULL if there will
    79	 *			be none.
    80	 * @extra_fdt_size:	Additional size for the new FDT buffer.
    81	 *
    82	 * Return: fdt on success, or NULL errno on error.
    83	 */
    84	void *of_kexec_alloc_and_setup_fdt(const struct kimage *image,
    85					   unsigned long initrd_load_addr,
    86					   unsigned long initrd_len,
    87					   const char *cmdline, size_t extra_fdt_size)
    88	{
    89		void *fdt;
    90		int ret, chosen_node;
    91		const void *prop;
    92		size_t fdt_size;
    93	
    94		fdt_size = fdt_totalsize(initial_boot_params) +
    95			   (cmdline ? strlen(cmdline) : 0) +
    96			   FDT_EXTRA_SPACE +
    97			   extra_fdt_size;
    98		fdt = kvmalloc(fdt_size, GFP_KERNEL);
    99		if (!fdt)
   100			return NULL;
   101	
   102		ret = fdt_open_into(initial_boot_params, fdt, fdt_size);
   103		if (ret < 0) {
   104			pr_err("Error %d setting up the new device tree.\n", ret);
   105			goto out;
   106		}
   107	
   108		/* Remove memory reservation for the current device tree. */
   109		ret = fdt_find_and_del_mem_rsv(fdt, __pa(initial_boot_params),
   110					       fdt_totalsize(initial_boot_params));
   111		if (ret == -EINVAL) {
   112			pr_err("Error removing memory reservation.\n");
   113			goto out;
   114		}
   115	
   116		chosen_node = fdt_path_offset(fdt, "/chosen");
   117		if (chosen_node == -FDT_ERR_NOTFOUND)
   118			chosen_node = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
   119						      "chosen");
   120		if (chosen_node < 0) {
   121			ret = chosen_node;
   122			goto out;
   123		}
   124	
   125		ret = fdt_delprop(fdt, chosen_node, FDT_PROP_KEXEC_ELFHDR);
   126		if (ret && ret != -FDT_ERR_NOTFOUND)
   127			goto out;
   128		ret = fdt_delprop(fdt, chosen_node, FDT_PROP_MEM_RANGE);
   129		if (ret && ret != -FDT_ERR_NOTFOUND)
   130			goto out;
   131	
   132		/* Did we boot using an initrd? */
   133		prop = fdt_getprop(fdt, chosen_node, "linux,initrd-start", NULL);
   134		if (prop) {
   135			u64 tmp_start, tmp_end, tmp_size;
   136	
   137			tmp_start = fdt64_to_cpu(*((const fdt64_t *) prop));
   138	
   139			prop = fdt_getprop(fdt, chosen_node, "linux,initrd-end", NULL);
   140			if (!prop) {
   141				ret = -EINVAL;
   142				goto out;
   143			}
   144	
   145			tmp_end = fdt64_to_cpu(*((const fdt64_t *) prop));
   146	
   147			/*
   148			 * kexec reserves exact initrd size, while firmware may
   149			 * reserve a multiple of PAGE_SIZE, so check for both.
   150			 */
   151			tmp_size = tmp_end - tmp_start;
   152			ret = fdt_find_and_del_mem_rsv(fdt, tmp_start, tmp_size);
   153			if (ret == -ENOENT)
   154				ret = fdt_find_and_del_mem_rsv(fdt, tmp_start,
   155							       round_up(tmp_size, PAGE_SIZE));
   156			if (ret == -EINVAL)
   157				goto out;
   158		}
   159	
   160		/* add initrd-* */
   161		if (initrd_load_addr) {
   162			ret = fdt_setprop_u64(fdt, chosen_node, FDT_PROP_INITRD_START,
   163					      initrd_load_addr);
   164			if (ret)
   165				goto out;
   166	
   167			ret = fdt_setprop_u64(fdt, chosen_node, FDT_PROP_INITRD_END,
   168					      initrd_load_addr + initrd_len);
   169			if (ret)
   170				goto out;
   171	
   172			ret = fdt_add_mem_rsv(fdt, initrd_load_addr, initrd_len);
   173			if (ret)
   174				goto out;
   175	
   176		} else {
   177			ret = fdt_delprop(fdt, chosen_node, FDT_PROP_INITRD_START);
   178			if (ret && (ret != -FDT_ERR_NOTFOUND))
   179				goto out;
   180	
   181			ret = fdt_delprop(fdt, chosen_node, FDT_PROP_INITRD_END);
   182			if (ret && (ret != -FDT_ERR_NOTFOUND))
   183				goto out;
   184		}
   185	
   186		if (image->type == KEXEC_TYPE_CRASH) {
   187			/* add linux,elfcorehdr */
   188			ret = fdt_appendprop_addrrange(fdt, 0, chosen_node,
   189					FDT_PROP_KEXEC_ELFHDR,
 > 190					image->arch.elf_load_addr,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux