tree:
https://github.com/jimc/linux.git dd-drm-next
head: 2eec9300d730ad634b967a853579f0b5dffecc01
commit: 8819a72010473e6a18e27cb4a464fb921b1afbc0 [14/20] dyndbg: add print-to-tracefs,
selftest with it - RFC
config: arm64-randconfig-r033-20211013 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
#
https://github.com/jimc/linux/commit/8819a72010473e6a18e27cb4a464fb921b1a...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 8819a72010473e6a18e27cb4a464fb921b1afbc0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=arm64 SHELL=/bin/bash
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 >>):
> lib/dynamic_debug.c:1308:48: error: incomplete definition of type
'struct module'
pr_warn("tracer-fn already set for
%s\n", mod->name);
~~~^
include/linux/printk.h:499:37: note: expanded from macro 'pr_warn'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1331:51: error: incomplete definition of type 'struct
module'
pr_warn("delete: cant find tracer for %s\n", mod->name);
~~~^
include/linux/printk.h:499:37: note: expanded from macro 'pr_warn'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1335:41: error: incomplete definition of type 'struct
module'
vpr_info("deleted tracer for %s\n", mod->name);
~~~^
lib/dynamic_debug.c:135:48: note: expanded from macro 'vpr_info'
#define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
lib/dynamic_debug.c:132:18: note: expanded from macro 'vnpr_info'
pr_info(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:519:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1355:10: error: incomplete definition of type 'struct
module'
if (mod->name == dt->mod_name) {
~~~^
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1359:18: error: incomplete definition of type 'struct
module'
if (!strcmp(mod->name, dt->mod_name)) {
~~~^
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1378:35: error: incomplete definition of type 'struct
module'
vpr_info("%s %s\n", __func__, mod->name);
~~~^
lib/dynamic_debug.c:135:48: note: expanded from macro 'vpr_info'
#define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
lib/dynamic_debug.c:132:18: note: expanded from macro 'vnpr_info'
pr_info(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:519:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:339:8: note: forward declaration of 'struct module'
struct module;
^
lib/dynamic_debug.c:1395:35: error: incomplete definition of type 'struct
module'
vpr_info("%s %s\n", __func__, mod->name);
~~~^
lib/dynamic_debug.c:135:48: note: expanded from macro 'vpr_info'
#define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
lib/dynamic_debug.c:132:18: note: expanded from macro 'vnpr_info'
pr_info(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:519:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
vim +1308 lib/dynamic_debug.c
1295
1296 /*
1297 * key computation is done on insert, such that lookup is trivial.
1298 * We use the modname ref in the 1st ddebug descriptor, the others in
1299 * the table are identical, giving us the module-scope lookup we want.
1300 */
1301 static int ddebug_tracer_add(void (*tracer)(const char *lbl, struct va_format
*vaf),
1302 struct module *mod, struct ddebug_table *dt)
1303 {
1304 struct ddebug_tracer *trc;
1305
1306 trc = ddebug_tracer_find(dt->ddebugs[0].modname);
1307 if (trc) {
1308 pr_warn("tracer-fn already set for %s\n",
mod->name);
1309 return -1;
1310 }
1311 trc = kmalloc(sizeof(*trc), GFP_ATOMIC);
1312 if (!trc)
1313 return -ENOMEM;
1314
1315 trc->tracefn = tracer;
1316 trc->key = (u64)dt->ddebugs[0].modname;
1317 hash_add(ddebug_tracer_by_module, &trc->hnode,
(u64)dt->ddebugs[0].modname);
1318
1319 vpr_info("added tracer-fn for module %s\n", dt->ddebugs[0].modname);
1320
1321 return 0;
1322 }
1323
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org