Re: [PATCH 2/3] remoteproc: Add inline coredump functionality
From: kbuild test robot
Date: Mon Apr 20 2020 - 02:02:17 EST
Hi Rishabh,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.6]
[cannot apply to linus/master linux/master remoteproc/for-next rpmsg/for-next v5.7-rc1 next-20200416]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Rishabh-Bhatnagar/remoteproc-Make-coredump-functionality-configurable/20200417-042251
base: 7111951b8d4973bda27ff663f2cf18b663d15b48
config: arm-omap2plus_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
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 GCC_VERSION=9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
drivers/remoteproc/remoteproc_coredump.c: In function 'rproc_read_dump':
>> drivers/remoteproc/remoteproc_coredump.c:68:32: error: passing argument 3 of 'resolve_addr' from incompatible pointer type [-Werror=incompatible-pointer-types]
68 | &rproc->dump_segments, &data_left);
| ^~~~~~~~~~
| |
| size_t * {aka unsigned int *}
drivers/remoteproc/remoteproc_coredump.c:24:23: note: expected 'long unsigned int *' but argument is of type 'size_t *' {aka 'unsigned int *'}
24 | unsigned long *data_left)
| ~~~~~~~~~~~~~~~^~~~~~~~~
cc1: some warnings being treated as errors
vim +/resolve_addr +68 drivers/remoteproc/remoteproc_coredump.c
44
45 static ssize_t rproc_read_dump(char *buffer, loff_t offset, size_t count,
46 void *data, size_t header_size)
47 {
48 void *device_mem;
49 size_t data_left, copy_size, bytes_left = count;
50 unsigned long addr;
51 struct rproc_coredump_state *dump_state = data;
52 struct rproc *rproc = dump_state->rproc;
53 void *elfcore = dump_state->header;
54
55 /* Copy the header first */
56 if (offset < header_size) {
57 copy_size = header_size - offset;
58 copy_size = min(copy_size, bytes_left);
59
60 memcpy(buffer, elfcore + offset, copy_size);
61 offset += copy_size;
62 bytes_left -= copy_size;
63 buffer += copy_size;
64 }
65
66 while (bytes_left) {
67 addr = resolve_addr(offset - header_size,
> 68 &rproc->dump_segments, &data_left);
69 /* EOF check */
70 if (data_left == 0) {
71 pr_info("Ramdump complete %lld bytes read", offset);
72 break;
73 }
74
75 copy_size = min_t(size_t, bytes_left, data_left);
76
77 device_mem = rproc->ops->da_to_va(rproc, addr, copy_size);
78 if (!device_mem) {
79 pr_err("Address:%lx with size %zd out of remoteproc carveout\n",
80 addr, copy_size);
81 return -ENOMEM;
82 }
83 memcpy(buffer, device_mem, copy_size);
84
85 offset += copy_size;
86 buffer += copy_size;
87 bytes_left -= copy_size;
88 }
89
90 return count - bytes_left;
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip