Re: [PATCH 2/3] remoteproc: qcom: Add capability to collect minidumps

kernel test robot
2020-08-08T02:22:11Z

[-- Attachment #1: Type: text/plain, Size: 4522 bytes --]

Hi Gurbir,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200807]
[cannot apply to linux/master linus/master v5.8 v5.8-rc7 v5.8-rc6 v5.8]
[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/Gurbir-Arora/Introduce-mini-dump-support-for-remoteproc/20200808-073315
base: 471e638c4c5df4c0035a76a561ada4d28228e5fd
config: x86_64-randconfig-s022-20200807 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-118-ge1578773-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64

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 >>):

ld: drivers/remoteproc/remoteproc_coredump.o: in function `rproc_minidump':
>> drivers/remoteproc/remoteproc_coredump.c:510: undefined reference to `qcom_smem_get'

sparse warnings: (new ones prefixed by >>)

>> drivers/remoteproc/remoteproc_coredump.c:489:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got struct md_ss_region [noderef] __iomem *[assigned] region_info @@
>> drivers/remoteproc/remoteproc_coredump.c:489:25: sparse: expected void const *from
>> drivers/remoteproc/remoteproc_coredump.c:489:25: sparse: got struct md_ss_region [noderef] __iomem *[assigned] region_info
>> drivers/remoteproc/remoteproc_coredump.c:491:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void [noderef] __iomem *[assigned] offset @@
drivers/remoteproc/remoteproc_coredump.c:491:25: sparse: expected void const *from
>> drivers/remoteproc/remoteproc_coredump.c:491:25: sparse: got void [noderef] __iomem *[assigned] offset
drivers/remoteproc/remoteproc_coredump.c:493:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void [noderef] __iomem *[assigned] offset @@
drivers/remoteproc/remoteproc_coredump.c:493:25: sparse: expected void const *from
drivers/remoteproc/remoteproc_coredump.c:493:25: sparse: got void [noderef] __iomem *[assigned] offset

vim +510 drivers/remoteproc/remoteproc_coredump.c

460
461 static void add_minidump_segments(struct rproc *rproc, struct md_ss_toc *minidump_ss)
462 {
463 struct md_ss_region __iomem *region_info, *ptr;
464 int i, seg_cnt = minidump_ss->ss_region_count;
465 void __iomem *offset;
466 dma_addr_t da;
467 size_t size;
468 char *name;
469
470 if (!list_empty(&rproc->dump_segments))
471 goto minidump;
472
473 region_info = ioremap((unsigned long)minidump_ss->md_ss_smem_regions_baseptr,
474 seg_cnt * sizeof(struct md_ss_region));
475
476 if (!region_info) {
477 dev_err(&rproc->dev, "invalid minidump subsystem table\n");
478 return;
479 }
480
481 /* Iterate over the subsystem's segments and create rproc custom dump segments */
482 ptr = region_info;
483 offset = ptr;
484 for (i = 0; i < seg_cnt; i++) {
485 offset = region_info;
486 offset += sizeof(region_info->name) + sizeof(region_info->seq_num);
487 if (__raw_readl(offset) == MD_REGION_VALID) {
488 name = kmalloc(MAX_REGION_NAME_LENGTH, GFP_KERNEL);
> 489 memcpy(name, region_info, sizeof(region_info->name));
490 offset += sizeof(region_info->md_valid);
> 491 memcpy(&da, offset, sizeof(region_info->region_base_address));
492 offset += sizeof(region_info->region_base_address);
493 memcpy(&size, offset, sizeof(region_info->region_size));
494 rproc_coredump_add_custom_segment(rproc, da, size, NULL, name);
495 }
496 region_info++;
497 }
498
499 minidump:
500 return do_rproc_minidump(rproc);
501 }
502
503 void rproc_minidump(struct rproc *rproc)
504 {
505 struct md_ss_toc *minidump_ss;
506 size_t size;
507
508 /* Get Global minidump ToC*/
509 if (!g_md_toc)
> 510 g_md_toc = qcom_smem_get(QCOM_SMEM_HOST_ANY,

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35728 bytes --]