tree:
https://github.com/jimc/linux.git dd-drm
head: 558f6a2e2f7f44c4546cfae653b9c1c8f9b2f200
commit: 558f6a2e2f7f44c4546cfae653b9c1c8f9b2f200 [5/5] more-futzing
config: powerpc64-randconfig-r036-20210511 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://github.com/jimc/linux/commit/558f6a2e2f7f44c4546cfae653b9c1c8f9b2...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm
git checkout 558f6a2e2f7f44c4546cfae653b9c1c8f9b2f200
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:216:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:218:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:220:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:222:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:224:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
lib/dynamic_debug.c:1160:13: error: use of undeclared identifier
'OUR_QUERY_SIZE'
char query[OUR_QUERY_SIZE];
^
lib/dynamic_debug.c:1179:38: error: use of undeclared identifier
'format_class_prefixes'
sprintf(query, "format '^%s' %cp",
format_class_prefixes[bitpos],
^
> lib/dynamic_debug.c:1203:9: error: incompatible function pointer
types initializing 'int (*)(const char *, const struct kernel_param *)' with an
expression of type 'int (const char *, const char **, const struct kernel_param
*)' [-Werror,-Wincompatible-function-pointer-types]
.set =
param_set_dyndbg,
^~~~~~~~~~~~~~~~
12 warnings and 3 errors generated.
vim +1203 lib/dynamic_debug.c
0f03b0e100e7a3 Jim Cromie 2021-04-18 1153
558f6a2e2f7f44 Jim Cromie 2021-04-23 1154 static int param_set_dyndbg(const char *instr,
const char *prefixes[],
558f6a2e2f7f44 Jim Cromie 2021-04-23 1155 const struct kernel_param *kp)
0f03b0e100e7a3 Jim Cromie 2021-04-18 1156 {
0f03b0e100e7a3 Jim Cromie 2021-04-18 1157 unsigned int val;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1158 unsigned long changes, result;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1159 int rc, chgct = 0, totct = 0, bitpos;
0f03b0e100e7a3 Jim Cromie 2021-04-18 @1160 char query[OUR_QUERY_SIZE];
0f03b0e100e7a3 Jim Cromie 2021-04-18 1161
558f6a2e2f7f44 Jim Cromie 2021-04-23 1162 if (!prefixes) {
558f6a2e2f7f44 Jim Cromie 2021-04-23 1163 pr_err("%s: exec err:%d on: %s\n",
__func__, chgct, query);
558f6a2e2f7f44 Jim Cromie 2021-04-23 1164 return -EINVAL;
558f6a2e2f7f44 Jim Cromie 2021-04-23 1165 }
558f6a2e2f7f44 Jim Cromie 2021-04-23 1166
0f03b0e100e7a3 Jim Cromie 2021-04-18 1167 rc = kstrtouint(instr, 0, &val);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1168 if (rc) {
0f03b0e100e7a3 Jim Cromie 2021-04-18 1169 pr_err("%s: failed\n", __func__);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1170 return -EINVAL;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1171 }
0f03b0e100e7a3 Jim Cromie 2021-04-18 1172 result = val;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1173 // changes = result ^ __drm_debug;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1174
0f03b0e100e7a3 Jim Cromie 2021-04-18 1175 pr_debug("changes:0x%lx from
result:0x%lx\n", changes, result);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1176
558f6a2e2f7f44 Jim Cromie 2021-04-23 1177 for_each_set_bit(bitpos, &changes, 32) {
//ARRAY_SIZE(format_class_prefixes)) {
0f03b0e100e7a3 Jim Cromie 2021-04-18 1178
0f03b0e100e7a3 Jim Cromie 2021-04-18 1179 sprintf(query, "format '^%s'
%cp", format_class_prefixes[bitpos],
0f03b0e100e7a3 Jim Cromie 2021-04-18 1180 test_bit(bitpos, &result) ? '+'
: '-');
0f03b0e100e7a3 Jim Cromie 2021-04-18 1181
0f03b0e100e7a3 Jim Cromie 2021-04-18 1182 chgct = dynamic_debug_exec_queries(query,
"drm*");
0f03b0e100e7a3 Jim Cromie 2021-04-18 1183 if (chgct < 0) {
0f03b0e100e7a3 Jim Cromie 2021-04-18 1184 pr_err("%s: exec err:%d on:
%s\n", __func__, chgct, query);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1185 continue;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1186 }
0f03b0e100e7a3 Jim Cromie 2021-04-18 1187 pr_debug("change ct:%d on %s\n",
chgct, query);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1188 totct += chgct;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1189 }
0f03b0e100e7a3 Jim Cromie 2021-04-18 1190 pr_debug("total changes: %d\n",
totct);
0f03b0e100e7a3 Jim Cromie 2021-04-18 1191 //__drm_debug = result;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1192 return 0;
0f03b0e100e7a3 Jim Cromie 2021-04-18 1193 }
0f03b0e100e7a3 Jim Cromie 2021-04-18 1194
0f03b0e100e7a3 Jim Cromie 2021-04-18 1195 static int param_get_dyndbg(char *buffer,
const struct kernel_param *kp)
0f03b0e100e7a3 Jim Cromie 2021-04-18 1196 {
0f03b0e100e7a3 Jim Cromie 2021-04-18 1197 pr_debug("debug-val:0x%x\n",
//__drm_debug
0f03b0e100e7a3 Jim Cromie 2021-04-18 1198 *((unsigned int *)kp->arg));
0f03b0e100e7a3 Jim Cromie 2021-04-18 1199 return scnprintf(buffer, PAGE_SIZE,
"%u\n",
0f03b0e100e7a3 Jim Cromie 2021-04-18 1200 *((unsigned int *)kp->arg));
0f03b0e100e7a3 Jim Cromie 2021-04-18 1201 }
0f03b0e100e7a3 Jim Cromie 2021-04-18 1202 static const struct kernel_param_ops
param_ops_debug = {
0f03b0e100e7a3 Jim Cromie 2021-04-18 @1203 .set = param_set_dyndbg,
:::::: The code at line 1203 was first introduced by commit
:::::: 0f03b0e100e7a3c1568a2454f3d453f1706d636e dyndbg: 1st port of bitmap-to-query code
:::::: TO: Jim Cromie <jim.cromie(a)gmail.com>
:::::: CC: Jim Cromie <jim.cromie(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org