From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] remoteproc: core: Add a memory efficient coredump function
Date: Sat, 28 Mar 2020 12:49:45 +0800 [thread overview]
Message-ID: <202003281241.E57EXth7%lkp@intel.com> (raw)
In-Reply-To: <1585353412-19644-1-git-send-email-rishabhb@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 10327 bytes --]
Hi Rishabh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on linux/master v5.6-rc7]
[cannot apply to remoteproc/for-next rpmsg/for-next next-20200327]
[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-core-Add-a-memory-efficient-coredump-function/20200328-075826
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 69c5eea3128e775fd3c70ecf0098105d96dee330
config: openrisc-randconfig-a001-20200327 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.2.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
GCC_VERSION=9.2.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/remoteproc/remoteproc_core.c:19:
drivers/remoteproc/remoteproc_core.c: In function 'rproc_read_dump':
include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/kernel.h:849:4: note: in expansion of macro '__typecheck'
849 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:868:19: note: in expansion of macro '__careful_cmp'
868 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
>> drivers/remoteproc/remoteproc_core.c:1562:15: note: in expansion of macro 'min'
1562 | copy_size = min(copy_size, bytes_left);
| ^~~
drivers/remoteproc/remoteproc_core.c: In function 'rproc_coredump':
drivers/remoteproc/remoteproc_core.c:1721:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1721 | int rproc_trigger_recovery(struct rproc *rproc)
| ^~~
drivers/remoteproc/remoteproc_core.c:1764:13: error: invalid storage class for function 'rproc_crash_handler_work'
1764 | static void rproc_crash_handler_work(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/remoteproc/remoteproc_core.c:19:
drivers/remoteproc/remoteproc_core.c:1851:15: error: non-static declaration of 'rproc_boot' follows static declaration
1851 | EXPORT_SYMBOL(rproc_boot);
| ^~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
158 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1851:1: note: in expansion of macro 'EXPORT_SYMBOL'
1851 | EXPORT_SYMBOL(rproc_boot);
| ^~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1800:5: note: previous definition of 'rproc_boot' was here
1800 | int rproc_boot(struct rproc *rproc)
| ^~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/remoteproc/remoteproc_core.c:19:
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
158 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1851:1: note: in expansion of macro 'EXPORT_SYMBOL'
1851 | EXPORT_SYMBOL(rproc_boot);
| ^~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1905:15: error: non-static declaration of 'rproc_shutdown' follows static declaration
1905 | EXPORT_SYMBOL(rproc_shutdown);
| ^~~~~~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
158 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1905:1: note: in expansion of macro 'EXPORT_SYMBOL'
1905 | EXPORT_SYMBOL(rproc_shutdown);
| ^~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1872:6: note: previous definition of 'rproc_shutdown' was here
1872 | void rproc_shutdown(struct rproc *rproc)
| ^~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/remoteproc/remoteproc_core.c:19:
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
158 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1905:1: note: in expansion of macro 'EXPORT_SYMBOL'
1905 | EXPORT_SYMBOL(rproc_shutdown);
| ^~~~~~~~~~~~~
drivers/remoteproc/remoteproc_core.c:1955:15: error: non-static declaration of 'rproc_get_by_phandle' follows static declaration
1955 | EXPORT_SYMBOL(rproc_get_by_phandle);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
vim +/min +1562 drivers/remoteproc/remoteproc_core.c
1549
1550 static ssize_t rproc_read_dump(char *buffer, loff_t offset, size_t count,
1551 void *data, size_t elfcorelen)
1552 {
1553 void *device_mem = NULL;
1554 unsigned long data_left = 0;
1555 unsigned long bytes_left = count;
1556 unsigned long addr = 0;
1557 size_t copy_size = 0;
1558 struct rproc *rproc = data;
1559
1560 if (offset < elfcorelen) {
1561 copy_size = elfcorelen - offset;
> 1562 copy_size = min(copy_size, bytes_left);
1563
1564 memcpy(buffer, rproc->elfcore + offset, copy_size);
1565 offset += copy_size;
1566 bytes_left -= copy_size;
1567 buffer += copy_size;
1568 }
1569
1570 while (bytes_left) {
1571 addr = get_offset(offset - elfcorelen, &rproc->dump_segments,
1572 &data_left);
1573 /* EOF check */
1574 if (data_left == 0) {
1575 pr_info("Ramdump complete. %lld bytes read.", offset);
1576 return 0;
1577 }
1578
1579 copy_size = min_t(size_t, bytes_left, data_left);
1580
1581 device_mem = rproc->ops->da_to_va(rproc, addr, copy_size);
1582 if (!device_mem) {
1583 pr_err("Unable to ioremap: addr %lx, size %zd\n",
1584 addr, copy_size);
1585 return -ENOMEM;
1586 }
1587 memcpy(buffer, device_mem, copy_size);
1588
1589 offset += copy_size;
1590 buffer += copy_size;
1591 bytes_left -= copy_size;
1592 dev_dbg(&rproc->dev, "Copied %d bytes to userspace\n",
1593 copy_size);
1594 }
1595
1596 return count;
1597 }
1598
---
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: 25713 bytes --]
next prev parent reply other threads:[~2020-03-28 4:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 23:56 [PATCH] remoteproc: core: Add a memory efficient coredump function Rishabh Bhatnagar
2020-03-28 4:06 ` kbuild test robot
2020-03-28 4:49 ` kbuild test robot [this message]
2020-04-01 19:51 ` Bjorn Andersson
2020-04-01 19:51 ` Bjorn Andersson
2020-04-02 17:24 ` Mathieu Poirier
2020-04-03 5:16 ` Bjorn Andersson
2020-04-03 5:16 ` Bjorn Andersson
2020-04-03 18:46 ` rishabhb
2020-04-03 20:53 ` Mathieu Poirier
2020-04-08 18:03 ` rishabhb
2020-04-09 20:27 ` Bjorn Andersson
2020-04-09 20:27 ` Bjorn Andersson
2020-04-09 20:27 ` Bjorn Andersson
2020-04-10 10:31 ` Arnaud POULIQUEN
2020-04-10 10:31 ` Arnaud POULIQUEN
2020-04-11 1:16 ` Bjorn Andersson
2020-04-11 1:16 ` Bjorn Andersson
2020-04-11 1:16 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202003281241.E57EXth7%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.