Hi Ben,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc5 next-20200715]
[cannot apply to xlnx/master remoteproc/for-next rpmsg/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Ben-Levinsky/Provide-basic-drive...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e9919e11e219eaa5e8041b7b1a196839143e9125
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/remoteproc/zynqmp_r5_remoteproc.c:267:25: warning: no
previous prototype for 'handle_tcm_parsing' [-Wmissing-prototypes]
267
| struct rproc_mem_entry *handle_tcm_parsing(struct device *dev,
| ^~~~~~~~~~~~~~~~~~
drivers/remoteproc/zynqmp_r5_remoteproc.c: In function 'handle_tcm_parsing':
> drivers/remoteproc/zynqmp_r5_remoteproc.c:286:10: warning:
returning 'int' from a function with return type 'struct rproc_mem_entry
*' makes pointer from integer without a cast [-Wint-conversion]
286 |
return -EINVAL;
| ^
drivers/remoteproc/zynqmp_r5_remoteproc.c:293:10: warning: returning 'int' from
a function with return type 'struct rproc_mem_entry *' makes pointer from integer
without a cast [-Wint-conversion]
293 | return -EINVAL;
| ^
drivers/remoteproc/zynqmp_r5_remoteproc.c:298:10: warning: returning 'int' from
a function with return type 'struct rproc_mem_entry *' makes pointer from integer
without a cast [-Wint-conversion]
298 | return -ENOMEM;
| ^
drivers/remoteproc/zynqmp_r5_remoteproc.c:317:10: warning: returning 'int' from
a function with return type 'struct rproc_mem_entry *' makes pointer from integer
without a cast [-Wint-conversion]
317 | return -ENOMEM;
| ^
vim +/handle_tcm_parsing +267 drivers/remoteproc/zynqmp_r5_remoteproc.c
263
264 /*
265 * TCM needs mapping to R5 relative address and xilinx platform mgmt call
266 */
267 struct rproc_mem_entry *handle_tcm_parsing(struct device *dev,
268 struct reserved_mem *rmem,
269 struct device_node *node,
270 int lookup_idx)
271 {
272 void *va;
273 dma_addr_t dma;
274 resource_size_t size;
275 int ret;
276 u32 pnode_id;
277 struct resource rsc;
278 struct rproc_mem_entry *mem;
279
280 pnode_id = tcm_addr_to_pnode[lookup_idx][1];
281 ret = zynqmp_pm_request_node(pnode_id,
282 ZYNQMP_PM_CAPABILITY_ACCESS, 0,
283 ZYNQMP_PM_REQUEST_ACK_BLOCKING);
284 if (ret < 0) {
285 dev_err(dev, "failed to request power node: %u\n", pnode_id);
286 return -EINVAL;
287 }
288
289 ret = of_address_to_resource(node, 0, &rsc);
290 if (ret < 0) {
291 dev_err(dev, "failed to get resource of memory %s",
292 of_node_full_name(node));
293 return -EINVAL;
294 }
295 size = resource_size(&rsc);
296 va = devm_ioremap_wc(dev, rsc.start, size);
297 if (!va)
298 return -ENOMEM;
299
300 /* zero out tcm base address */
301 if (rsc.start & 0xffe00000) {
302 /* R5 can't see anything past 0xfffff so wipe it */
303 rsc.start &= 0x000fffff;
304 /*
305 * handle tcm banks 1 a and b (0xffe9000 and
306 * 0xffeb0000)
307 */
308 if (rsc.start & 0x80000)
309 rsc.start -= 0x90000;
310 }
311
312 dma = (dma_addr_t)rsc.start;
313 mem = rproc_mem_entry_init(dev, va, dma, (int)size, rsc.start,
314 NULL, zynqmp_r5_mem_release,
315 rsc.name);
316 if (!mem)
317 return -ENOMEM;
318
319 return mem;
320 }
321
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org