* [shenki:arm-kexec-file 6/6] arch/arm/kernel/machine_kexec_file.c:104:8: error: implicit declaration of function 'of_kexec_alloc_and_setup_fdt'
@ 2021-05-04 14:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-04 14:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4169 bytes --]
tree: https://github.com/shenki/linux arm-kexec-file
head: ded16619931dbef84d13bb8a1bae73e1870e2ddc
commit: ded16619931dbef84d13bb8a1bae73e1870e2ddc [6/6] ARM: kexec: Implement kexec zimage load
config: arm-randconfig-r004-20210504 (attached as .config)
compiler: arm-linux-gnueabi-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://github.com/shenki/linux/commit/ded16619931dbef84d13bb8a1bae73e1870e2ddc
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki arm-kexec-file
git checkout ded16619931dbef84d13bb8a1bae73e1870e2ddc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/arm/kernel/machine_kexec_file.c: In function 'kexec_zimage_load':
>> arch/arm/kernel/machine_kexec_file.c:104:8: error: implicit declaration of function 'of_kexec_alloc_and_setup_fdt' [-Werror=implicit-function-declaration]
104 | dtb = of_kexec_alloc_and_setup_fdt(image, 0, 0, cmdline, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/kernel/machine_kexec_file.c:104:6: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
104 | dtb = of_kexec_alloc_and_setup_fdt(image, 0, 0, cmdline, 0);
| ^
cc1: some warnings being treated as errors
vim +/of_kexec_alloc_and_setup_fdt +104 arch/arm/kernel/machine_kexec_file.c
65
66 static void *kexec_zimage_load(struct kimage *image, char *kernel,
67 unsigned long kernel_len, char *initrd,
68 unsigned long initrd_len, char *cmdline,
69 unsigned long cmdline_len)
70 {
71 struct zimage_header *hdr;
72 void *dtb;
73 struct kexec_buf kbuf = { };
74 struct kexec_buf dtb_kbuf = { };
75 int size;
76 int ret;
77
78 hdr = (struct zimage_header *)kernel;
79 size = le32_to_cpu(hdr->end) - le32_to_cpu(hdr->start);
80
81 kbuf.image = image;
82 kbuf.buf_min = 0;
83 kbuf.buf_max = ULONG_MAX;
84 kbuf.top_down = false;
85
86 kbuf.buffer = kernel;
87 kbuf.bufsz = kernel_len;
88 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
89 kbuf.memsz = size;
90 kbuf.buf_align = SZ_2M;
91
92 ret = kexec_add_buffer(&kbuf);
93 if (ret)
94 return ERR_PTR(ret);
95
96 pr_debug("Loading kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
97 kbuf.mem, kbuf.bufsz, kbuf.memsz);
98
99 image->start = kbuf.mem;
100
101 /* load dtb */
102 /* TODO: initrd */
103 // dtb = of_kexec_alloc_and_setup_fdt(image, initrd_load_addr, initrd_len, cmdline, 0); */
> 104 dtb = of_kexec_alloc_and_setup_fdt(image, 0, 0, cmdline, 0);
105 if (!dtb) {
106 pr_err("Preparing for new dtb failed\n");
107 return ERR_PTR(ret);
108 }
109
110 /* trim it */
111 fdt_pack(dtb);
112 dtb_kbuf.image = image;
113 dtb_kbuf.buffer = dtb;
114 dtb_kbuf.bufsz = fdt_totalsize(dtb);
115 dtb_kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
116 dtb_kbuf.memsz = fdt_totalsize(dtb);
117 dtb_kbuf.buf_align = SZ_2M;
118 dtb_kbuf.buf_max = ULONG_MAX;
119 dtb_kbuf.top_down = true;
120
121 ret = kexec_add_buffer(&dtb_kbuf);
122 if (ret)
123 return ERR_PTR(ret);
124 /* TODO: do we use these, or ignore them? */
125 // image->arch.dtb = dtb;
126 // image->arch.dtb_mem = dtb_kbuf.mem;
127
128 pr_debug("Loading dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
129 dtb_kbuf.mem, dtb_kbuf.bufsz, dtb_kbuf.memsz);
130
131 return NULL;
132 }
133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32448 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-04 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 14:41 [shenki:arm-kexec-file 6/6] arch/arm/kernel/machine_kexec_file.c:104:8: error: implicit declaration of function 'of_kexec_alloc_and_setup_fdt' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.