[djwong-xfs:vectorized-scrub 110/308] ld.lld: error: undefined symbol: xchk_iscan_start
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: d404c6b945070ba14d8db1ee79daa5df149877df
commit: aa567553268823bd23b665100da66740bfab460a [110/308] xfs: online repair of parent pointers
config: i386-randconfig-a011-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs vectorized-scrub
git checkout aa567553268823bd23b665100da66740bfab460a
# 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=i386 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 >>):
>> ld.lld: error: undefined symbol: xchk_iscan_start
>>> referenced by parent_repair.c:294 (fs/xfs/scrub/parent_repair.c:294)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: xchk_iscan_advance
>>> referenced by parent_repair.c:295 (fs/xfs/scrub/parent_repair.c:295)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
>>> referenced by parent_repair.c:295 (fs/xfs/scrub/parent_repair.c:295)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: xchk_iscan_iget
>>> referenced by parent_repair.c:296 (fs/xfs/scrub/parent_repair.c:296)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: __xchk_iscan_visit
>>> referenced by iscan.h:76 (fs/xfs/scrub/iscan.h:76)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: xchk_iscan_finish
>>> referenced by parent_repair.c:314 (fs/xfs/scrub/parent_repair.c:314)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
>>> referenced by parent_repair.c:314 (fs/xfs/scrub/parent_repair.c:314)
>>> xfs/scrub/parent_repair.o:(xrep_parent_scan) in archive fs/built-in.a
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH 07/14] block: change plugging to use a singly linked list
by kernel test robot
Hi Jens,
I love your patch! Yet something to improve:
[auto build test ERROR on axboe-block/for-next]
[cannot apply to linus/master v5.15-rc5 next-20211015]
[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/Jens-Axboe/Various-block-layer-o...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: hexagon-randconfig-r041-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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
# https://github.com/0day-ci/linux/commit/6ed4540d0461ab59f1dc96a0b448eb12c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jens-Axboe/Various-block-layer-optimizations/20211017-093822
git checkout 6ed4540d0461ab59f1dc96a0b448eb12c3446182
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> block/blk-core.c:1636:7: error: implicit declaration of function 'rq_list_empty' [-Werror,-Wimplicit-function-declaration]
if (!rq_list_empty(plug->mq_list))
^
1 error generated.
--
>> block/blk-merge.c:1094:15: error: implicit declaration of function 'rq_list_empty' [-Werror,-Wimplicit-function-declaration]
if (!plug || rq_list_empty(plug->mq_list))
^
>> block/blk-merge.c:1098:7: error: implicit declaration of function 'rq_list_peek' [-Werror,-Wimplicit-function-declaration]
rq = rq_list_peek(&plug->mq_list);
^
block/blk-merge.c:1098:7: note: did you mean 'bio_list_peek'?
include/linux/bio.h:553:27: note: 'bio_list_peek' declared here
static inline struct bio *bio_list_peek(struct bio_list *bl)
^
>> block/blk-merge.c:1098:5: warning: incompatible integer to pointer conversion assigning to 'struct request *' from 'int' [-Wint-conversion]
rq = rq_list_peek(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
--
>> block/blk-mq.c:2134:10: error: implicit declaration of function 'rq_list_empty' [-Werror,-Wimplicit-function-declaration]
while (!rq_list_empty(plug->mq_list)) {
^
>> block/blk-mq.c:2138:8: error: implicit declaration of function 'rq_list_pop' [-Werror,-Wimplicit-function-declaration]
rq = rq_list_pop(&plug->mq_list);
^
block/blk-mq.c:2138:8: note: did you mean 'bio_list_pop'?
include/linux/bio.h:558:27: note: 'bio_list_pop' declared here
static inline struct bio *bio_list_pop(struct bio_list *bl)
^
>> block/blk-mq.c:2138:6: warning: incompatible integer to pointer conversion assigning to 'struct request *' from 'int' [-Wint-conversion]
rq = rq_list_pop(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-mq.c:2181:6: error: implicit declaration of function 'rq_list_empty' [-Werror,-Wimplicit-function-declaration]
if (rq_list_empty(plug->mq_list))
^
block/blk-mq.c:2197:8: error: implicit declaration of function 'rq_list_pop' [-Werror,-Wimplicit-function-declaration]
rq = rq_list_pop(&plug->mq_list);
^
block/blk-mq.c:2197:6: warning: incompatible integer to pointer conversion assigning to 'struct request *' from 'int' [-Wint-conversion]
rq = rq_list_pop(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> block/blk-mq.c:2402:25: error: implicit declaration of function 'rq_list_peek' [-Werror,-Wimplicit-function-declaration]
struct request *nxt = rq_list_peek(&plug->mq_list);
^
block/blk-mq.c:2402:25: note: did you mean 'bio_list_peek'?
include/linux/bio.h:553:27: note: 'bio_list_peek' declared here
static inline struct bio *bio_list_peek(struct bio_list *bl)
^
>> block/blk-mq.c:2402:19: warning: incompatible integer to pointer conversion initializing 'struct request *' with an expression of type 'int' [-Wint-conversion]
struct request *nxt = rq_list_peek(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> block/blk-mq.c:2410:2: error: implicit declaration of function 'rq_list_add' [-Werror,-Wimplicit-function-declaration]
rq_list_add(&plug->mq_list, rq);
^
block/blk-mq.c:2410:2: note: did you mean '__list_add'?
include/linux/list.h:63:20: note: '__list_add' declared here
static inline void __list_add(struct list_head *new,
^
block/blk-mq.c:2526:10: error: implicit declaration of function 'rq_list_peek' [-Werror,-Wimplicit-function-declaration]
tmp = rq_list_peek(&plug->mq_list);
^
block/blk-mq.c:2526:8: warning: incompatible integer to pointer conversion assigning to 'struct request *' from 'int' [-Wint-conversion]
tmp = rq_list_peek(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-mq.c:2550:8: error: implicit declaration of function 'rq_list_empty' [-Werror,-Wimplicit-function-declaration]
if (!rq_list_empty(plug->mq_list) && same_queue_rq) {
^
block/blk-mq.c:2551:15: error: implicit declaration of function 'rq_list_pop' [-Werror,-Wimplicit-function-declaration]
first_rq = rq_list_pop(&plug->mq_list);
^
block/blk-mq.c:2551:13: warning: incompatible integer to pointer conversion assigning to 'struct request *' from 'int' [-Wint-conversion]
first_rq = rq_list_pop(&plug->mq_list);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings and 9 errors generated.
vim +/rq_list_empty +1636 block/blk-core.c
1631
1632 void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
1633 {
1634 flush_plug_callbacks(plug, from_schedule);
1635
> 1636 if (!rq_list_empty(plug->mq_list))
1637 blk_mq_flush_plug_list(plug, from_schedule);
1638 if (unlikely(!from_schedule && plug->cached_rq))
1639 blk_mq_free_plug_rqs(plug);
1640 }
1641
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
WARNING: modpost: vmlinux.o(.text+0x7ec77): Section mismatch in reference from the function test_bit() to the variable .init.data:numa_nodes_parsed
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d999ade1cc86cd2951d41c11ea769cb4452c8811
commit: d0a3ac549f389c1511a4df0d7638536305205d20 ubsan: enable for all*config builds
date: 10 months ago
config: x86_64-buildonly-randconfig-r004-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d0a3ac549f389c1511a4df0d7638536305205d20
# 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=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> WARNING: modpost: vmlinux.o(.text+0x7ec77): Section mismatch in reference from the function test_bit() to the variable .init.data:numa_nodes_parsed
The function test_bit() references
the variable __initdata numa_nodes_parsed.
This is often because test_bit lacks a __initdata
annotation or the annotation of numa_nodes_parsed is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x7eca4): Section mismatch in reference from the function __nodes_weight() to the variable .init.data:numa_nodes_parsed
The function __nodes_weight() references
the variable __initdata numa_nodes_parsed.
This is often because __nodes_weight lacks a __initdata
annotation or the annotation of numa_nodes_parsed is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x7ecd7): Section mismatch in reference from the function early_get_smp_config() to the variable .init.data:x86_init
The function early_get_smp_config() references
the variable __initdata x86_init.
This is often because early_get_smp_config lacks a __initdata
annotation or the annotation of x86_init is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x7ece8): Section mismatch in reference from the function __first_node() to the variable .init.data:numa_nodes_parsed
The function __first_node() references
the variable __initdata numa_nodes_parsed.
This is often because __first_node lacks a __initdata
annotation or the annotation of numa_nodes_parsed is wrong.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[djwong-xfs:vectorized-scrub 38/308] fs/xfs/scrub/refcount_repair.c:339:12: error: implicit declaration of function 'xfarray_insert_anywhere'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: d404c6b945070ba14d8db1ee79daa5df149877df
commit: e55ee1f9d09eea71aaf4056199caf105fe40e18a [38/308] xfs: repair refcount btrees
config: i386-randconfig-r005-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs vectorized-scrub
git checkout e55ee1f9d09eea71aaf4056199caf105fe40e18a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the djwong-xfs/vectorized-scrub HEAD d404c6b945070ba14d8db1ee79daa5df149877df builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
>> fs/xfs/scrub/refcount_repair.c:339:12: error: implicit declaration of function 'xfarray_insert_anywhere' [-Werror,-Wimplicit-function-declaration]
error = xfarray_insert_anywhere(rmap_bag, &rrm);
^
fs/xfs/scrub/refcount_repair.c:339:12: note: did you mean 'xfarray_store_anywhere'?
fs/xfs/scrub/xfarray.h:27:5: note: 'xfarray_store_anywhere' declared here
int xfarray_store_anywhere(struct xfarray *array, void *ptr);
^
fs/xfs/scrub/refcount_repair.c:386:13: error: implicit declaration of function 'xfarray_insert_anywhere' [-Werror,-Wimplicit-function-declaration]
error = xfarray_insert_anywhere(rmap_bag,
^
>> fs/xfs/scrub/refcount_repair.c:452:9: error: implicit declaration of function 'xfarray_iter_get' [-Werror,-Wimplicit-function-declaration]
return xfarray_iter_get(rr->refcount_records, &rr->iter,
^
fs/xfs/scrub/refcount_repair.c:452:9: note: did you mean 'xfarray_store'?
fs/xfs/scrub/xfarray.h:26:5: note: 'xfarray_store' declared here
int xfarray_store(struct xfarray *array, uint64_t idx, void *ptr);
^
3 errors generated.
vim +/xfarray_insert_anywhere +339 fs/xfs/scrub/refcount_repair.c
296
297 /* Iterate all the rmap records to generate reference count data. */
298 STATIC int
299 xrep_refc_find_refcounts(
300 struct xrep_refc *rr)
301 {
302 struct xrep_refc_rmap rrm;
303 struct xfs_scrub *sc = rr->sc;
304 struct xfarray *rmap_bag;
305 xfs_agblock_t sbno;
306 xfs_agblock_t cbno;
307 xfs_agblock_t nbno;
308 size_t old_stack_sz;
309 size_t stack_sz = 0;
310 bool have;
311 int have_gt;
312 int error;
313
314 xrep_ag_btcur_init(sc, &sc->sa);
315
316 /* Set up some storage */
317 rmap_bag = xfarray_create("rmap bag", sizeof(struct xrep_refc_rmap));
318 if (IS_ERR(rmap_bag)) {
319 error = PTR_ERR(rmap_bag);
320 goto out_cur;
321 }
322
323 /* Start the rmapbt cursor to the left of all records. */
324 error = xfs_rmap_lookup_le(sc->sa.rmap_cur, 0, 0, 0, 0, NULL, &have_gt);
325 if (error)
326 goto out_bag;
327 ASSERT(have_gt == 0);
328
329 /* Process reverse mappings into refcount data. */
330 while (xfs_btree_has_more_records(sc->sa.rmap_cur)) {
331 /* Push all rmaps with pblk == sbno onto the stack */
332 error = xrep_refc_next_rrm(sc->sa.rmap_cur, rr, &rrm, &have);
333 if (error)
334 goto out_bag;
335 if (!have)
336 break;
337 sbno = cbno = rrm.startblock;
338 while (have && rrm.startblock == sbno) {
> 339 error = xfarray_insert_anywhere(rmap_bag, &rrm);
340 if (error)
341 goto out_bag;
342 stack_sz++;
343 error = xrep_refc_next_rrm(sc->sa.rmap_cur, rr, &rrm,
344 &have);
345 if (error)
346 goto out_bag;
347 }
348 error = xfs_btree_decrement(sc->sa.rmap_cur, 0, &have_gt);
349 if (error)
350 goto out_bag;
351 if (XFS_IS_CORRUPT(sc->mp, !have_gt)) {
352 error = -EFSCORRUPTED;
353 goto out_bag;
354 }
355
356 /* Set nbno to the bno of the next refcount change */
357 nbno = xrep_refc_next_edge(rmap_bag, &rrm, have);
358 if (nbno == NULLAGBLOCK) {
359 error = -EFSCORRUPTED;
360 goto out_bag;
361 }
362
363 ASSERT(nbno > sbno);
364 old_stack_sz = stack_sz;
365
366 /* While stack isn't empty... */
367 while (stack_sz) {
368 uint64_t i;
369
370 /* Pop all rmaps that end at nbno */
371 foreach_xfarray_item(rmap_bag, i, rrm) {
372 if (RRM_NEXT(rrm) != nbno)
373 continue;
374 error = xfarray_nullify(rmap_bag, i);
375 if (error)
376 goto out_bag;
377 stack_sz--;
378 }
379
380 /* Push array items that start at nbno */
381 error = xrep_refc_next_rrm(sc->sa.rmap_cur, rr, &rrm,
382 &have);
383 if (error)
384 goto out_bag;
385 while (have && rrm.startblock == nbno) {
386 error = xfarray_insert_anywhere(rmap_bag,
387 &rrm);
388 if (error)
389 goto out_bag;
390 stack_sz++;
391 error = xrep_refc_next_rrm(sc->sa.rmap_cur, rr,
392 &rrm, &have);
393 if (error)
394 goto out_bag;
395 }
396 error = xfs_btree_decrement(sc->sa.rmap_cur, 0,
397 &have_gt);
398 if (error)
399 goto out_bag;
400 if (XFS_IS_CORRUPT(sc->mp, !have_gt)) {
401 error = -EFSCORRUPTED;
402 goto out_bag;
403 }
404
405 /* Emit refcount if necessary */
406 ASSERT(nbno > cbno);
407 if (stack_sz != old_stack_sz) {
408 if (old_stack_sz > 1) {
409 error = xrep_refc_stash(rr, cbno,
410 nbno - cbno,
411 old_stack_sz);
412 if (error)
413 goto out_bag;
414 }
415 cbno = nbno;
416 }
417
418 /* Stack empty, go find the next rmap */
419 if (stack_sz == 0)
420 break;
421 old_stack_sz = stack_sz;
422 sbno = nbno;
423
424 /* Set nbno to the bno of the next refcount change */
425 nbno = xrep_refc_next_edge(rmap_bag, &rrm, have);
426 if (nbno == NULLAGBLOCK) {
427 error = -EFSCORRUPTED;
428 goto out_bag;
429 }
430
431 ASSERT(nbno > sbno);
432 }
433 }
434
435 ASSERT(stack_sz == 0);
436 out_bag:
437 xfarray_destroy(rmap_bag);
438 out_cur:
439 xchk_ag_btcur_free(&sc->sa);
440 return error;
441 }
442 #undef RRM_NEXT
443
444 /* Retrieve refcountbt data for bulk load. */
445 STATIC int
446 xrep_refc_get_record(
447 struct xfs_btree_cur *cur,
448 void *priv)
449 {
450 struct xrep_refc *rr = priv;
451
> 452 return xfarray_iter_get(rr->refcount_records, &rr->iter,
453 &cur->bc_rec.rc);
454 }
455
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[vgupta-arc:topic-zol-remove 112/188] mm/memory.c:773:1: warning: no previous prototype for function 'copy_nonpresent_pte'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git topic-zol-remove
head: 5d273f5d5109b942d3be84a4db0ffe05feb901d4
commit: b55091ec6890b580d5ca97add1bb56b5502e67df [112/188] xxx: dbg: uninline copy_p*_range() functions
config: hexagon-randconfig-r041-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git/commit/?id...
git remote add vgupta-arc https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
git fetch --no-tags vgupta-arc topic-zol-remove
git checkout b55091ec6890b580d5ca97add1bb56b5502e67df
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> mm/memory.c:773:1: warning: no previous prototype for function 'copy_nonpresent_pte' [-Wmissing-prototypes]
copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
^
mm/memory.c:772:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline unsigned long
^
static
>> mm/memory.c:1005:1: warning: no previous prototype for function 'copy_pte_range' [-Wmissing-prototypes]
copy_pte_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
^
mm/memory.c:1004:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline int
^
static
>> mm/memory.c:1129:1: warning: no previous prototype for function 'copy_pmd_range' [-Wmissing-prototypes]
copy_pmd_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
^
mm/memory.c:1128:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline int
^
static
>> mm/memory.c:1166:1: warning: no previous prototype for function 'copy_pud_range' [-Wmissing-prototypes]
copy_pud_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
^
mm/memory.c:1165:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline int
^
static
>> mm/memory.c:1203:1: warning: no previous prototype for function 'copy_p4d_range' [-Wmissing-prototypes]
copy_p4d_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
^
mm/memory.c:1202:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline int
^
static
mm/memory.c:3717:21: warning: no previous prototype for function 'do_anonymous_page' [-Wmissing-prototypes]
noinline vm_fault_t do_anonymous_page(struct vm_fault *vmf)
^
mm/memory.c:3717:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_anonymous_page(struct vm_fault *vmf)
^
static
mm/memory.c:3833:21: warning: no previous prototype for function '__do_fault' [-Wmissing-prototypes]
noinline vm_fault_t __do_fault(struct vm_fault *vmf)
^
mm/memory.c:3833:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t __do_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4157:21: warning: no previous prototype for function 'do_read_fault' [-Wmissing-prototypes]
noinline vm_fault_t do_read_fault(struct vm_fault *vmf)
^
mm/memory.c:4157:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_read_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4186:21: warning: no previous prototype for function 'do_cow_fault' [-Wmissing-prototypes]
noinline vm_fault_t do_cow_fault(struct vm_fault *vmf)
^
mm/memory.c:4186:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_cow_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4224:21: warning: no previous prototype for function 'do_shared_fault' [-Wmissing-prototypes]
noinline vm_fault_t do_shared_fault(struct vm_fault *vmf)
^
mm/memory.c:4224:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_shared_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4267:21: warning: no previous prototype for function 'do_fault' [-Wmissing-prototypes]
noinline vm_fault_t do_fault(struct vm_fault *vmf)
^
mm/memory.c:4267:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4506:21: warning: no previous prototype for function 'handle_pte_fault' [-Wmissing-prototypes]
noinline vm_fault_t handle_pte_fault(struct vm_fault *vmf)
^
mm/memory.c:4506:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t handle_pte_fault(struct vm_fault *vmf)
^
static
mm/memory.c:4610:21: warning: no previous prototype for function '__handle_mm_fault' [-Wmissing-prototypes]
noinline vm_fault_t __handle_mm_fault(struct vm_area_struct *vma,
^
mm/memory.c:4610:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t __handle_mm_fault(struct vm_area_struct *vma,
^
static
13 warnings generated.
vim +/copy_nonpresent_pte +773 mm/memory.c
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 765
^1da177e4c3f4152 Linus Torvalds 2005-04-16 766 /*
^1da177e4c3f4152 Linus Torvalds 2005-04-16 767 * copy one vm_area from one task to the other. Assumes the page tables
^1da177e4c3f4152 Linus Torvalds 2005-04-16 768 * already present in the new task to be cleared in the whole range
^1da177e4c3f4152 Linus Torvalds 2005-04-16 769 * covered by this vma.
^1da177e4c3f4152 Linus Torvalds 2005-04-16 770 */
^1da177e4c3f4152 Linus Torvalds 2005-04-16 771
b55091ec6890b580 Vineet Gupta 2020-12-17 772 noinline unsigned long
df3a57d1f6072d07 Linus Torvalds 2020-09-23 @773 copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
8f34f1eac3820fc2 Peter Xu 2021-06-30 774 pte_t *dst_pte, pte_t *src_pte, struct vm_area_struct *dst_vma,
8f34f1eac3820fc2 Peter Xu 2021-06-30 775 struct vm_area_struct *src_vma, unsigned long addr, int *rss)
^1da177e4c3f4152 Linus Torvalds 2005-04-16 776 {
8f34f1eac3820fc2 Peter Xu 2021-06-30 777 unsigned long vm_flags = dst_vma->vm_flags;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 778 pte_t pte = *src_pte;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 779 struct page *page;
0697212a411c1dae Christoph Lameter 2006-06-23 780 swp_entry_t entry = pte_to_swp_entry(pte);
0697212a411c1dae Christoph Lameter 2006-06-23 781
2022b4d18a491a57 Hugh Dickins 2014-12-02 782 if (likely(!non_swap_entry(entry))) {
570a335b8e22579e Hugh Dickins 2009-12-14 783 if (swap_duplicate(entry) < 0)
9a5cc85c407402ae Alistair Popple 2021-06-30 784 return -EIO;
570a335b8e22579e Hugh Dickins 2009-12-14 785
^1da177e4c3f4152 Linus Torvalds 2005-04-16 786 /* make sure dst_mm is on swapoff's mmlist. */
^1da177e4c3f4152 Linus Torvalds 2005-04-16 787 if (unlikely(list_empty(&dst_mm->mmlist))) {
^1da177e4c3f4152 Linus Torvalds 2005-04-16 788 spin_lock(&mmlist_lock);
f412ac08c9861b47 Hugh Dickins 2005-10-29 789 if (list_empty(&dst_mm->mmlist))
f412ac08c9861b47 Hugh Dickins 2005-10-29 790 list_add(&dst_mm->mmlist,
f412ac08c9861b47 Hugh Dickins 2005-10-29 791 &src_mm->mmlist);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 792 spin_unlock(&mmlist_lock);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 793 }
b084d4353ff99d82 KAMEZAWA Hiroyuki 2010-03-05 794 rss[MM_SWAPENTS]++;
2022b4d18a491a57 Hugh Dickins 2014-12-02 795 } else if (is_migration_entry(entry)) {
af5cdaf82238fb36 Alistair Popple 2021-06-30 796 page = pfn_swap_entry_to_page(entry);
9f9f1acd713d69fa Konstantin Khlebnikov 2012-01-20 797
eca56ff906bdd023 Jerome Marchand 2016-01-14 798 rss[mm_counter(page)]++;
9f9f1acd713d69fa Konstantin Khlebnikov 2012-01-20 799
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 800 if (is_writable_migration_entry(entry) &&
0697212a411c1dae Christoph Lameter 2006-06-23 801 is_cow_mapping(vm_flags)) {
0697212a411c1dae Christoph Lameter 2006-06-23 802 /*
9f9f1acd713d69fa Konstantin Khlebnikov 2012-01-20 803 * COW mappings require pages in both
9f9f1acd713d69fa Konstantin Khlebnikov 2012-01-20 804 * parent and child to be set to read.
0697212a411c1dae Christoph Lameter 2006-06-23 805 */
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 806 entry = make_readable_migration_entry(
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 807 swp_offset(entry));
0697212a411c1dae Christoph Lameter 2006-06-23 808 pte = swp_entry_to_pte(entry);
c3d16e16522fe3fe Cyrill Gorcunov 2013-10-16 809 if (pte_swp_soft_dirty(*src_pte))
c3d16e16522fe3fe Cyrill Gorcunov 2013-10-16 810 pte = pte_swp_mksoft_dirty(pte);
f45ec5ff16a75f96 Peter Xu 2020-04-06 811 if (pte_swp_uffd_wp(*src_pte))
f45ec5ff16a75f96 Peter Xu 2020-04-06 812 pte = pte_swp_mkuffd_wp(pte);
0697212a411c1dae Christoph Lameter 2006-06-23 813 set_pte_at(src_mm, addr, src_pte, pte);
0697212a411c1dae Christoph Lameter 2006-06-23 814 }
5042db43cc26f51e Jérôme Glisse 2017-09-08 815 } else if (is_device_private_entry(entry)) {
af5cdaf82238fb36 Alistair Popple 2021-06-30 816 page = pfn_swap_entry_to_page(entry);
5042db43cc26f51e Jérôme Glisse 2017-09-08 817
5042db43cc26f51e Jérôme Glisse 2017-09-08 818 /*
5042db43cc26f51e Jérôme Glisse 2017-09-08 819 * Update rss count even for unaddressable pages, as
5042db43cc26f51e Jérôme Glisse 2017-09-08 820 * they should treated just like normal pages in this
5042db43cc26f51e Jérôme Glisse 2017-09-08 821 * respect.
5042db43cc26f51e Jérôme Glisse 2017-09-08 822 *
5042db43cc26f51e Jérôme Glisse 2017-09-08 823 * We will likely want to have some new rss counters
5042db43cc26f51e Jérôme Glisse 2017-09-08 824 * for unaddressable pages, at some point. But for now
5042db43cc26f51e Jérôme Glisse 2017-09-08 825 * keep things as they are.
5042db43cc26f51e Jérôme Glisse 2017-09-08 826 */
5042db43cc26f51e Jérôme Glisse 2017-09-08 827 get_page(page);
5042db43cc26f51e Jérôme Glisse 2017-09-08 828 rss[mm_counter(page)]++;
5042db43cc26f51e Jérôme Glisse 2017-09-08 829 page_dup_rmap(page, false);
5042db43cc26f51e Jérôme Glisse 2017-09-08 830
5042db43cc26f51e Jérôme Glisse 2017-09-08 831 /*
5042db43cc26f51e Jérôme Glisse 2017-09-08 832 * We do not preserve soft-dirty information, because so
5042db43cc26f51e Jérôme Glisse 2017-09-08 833 * far, checkpoint/restore is the only feature that
5042db43cc26f51e Jérôme Glisse 2017-09-08 834 * requires that. And checkpoint/restore does not work
5042db43cc26f51e Jérôme Glisse 2017-09-08 835 * when a device driver is involved (you cannot easily
5042db43cc26f51e Jérôme Glisse 2017-09-08 836 * save and restore device driver state).
5042db43cc26f51e Jérôme Glisse 2017-09-08 837 */
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 838 if (is_writable_device_private_entry(entry) &&
5042db43cc26f51e Jérôme Glisse 2017-09-08 839 is_cow_mapping(vm_flags)) {
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 840 entry = make_readable_device_private_entry(
4dd845b5a3e57ad0 Alistair Popple 2021-06-30 841 swp_offset(entry));
5042db43cc26f51e Jérôme Glisse 2017-09-08 842 pte = swp_entry_to_pte(entry);
f45ec5ff16a75f96 Peter Xu 2020-04-06 843 if (pte_swp_uffd_wp(*src_pte))
f45ec5ff16a75f96 Peter Xu 2020-04-06 844 pte = pte_swp_mkuffd_wp(pte);
5042db43cc26f51e Jérôme Glisse 2017-09-08 845 set_pte_at(src_mm, addr, src_pte, pte);
5042db43cc26f51e Jérôme Glisse 2017-09-08 846 }
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 847 } else if (is_device_exclusive_entry(entry)) {
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 848 /*
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 849 * Make device exclusive entries present by restoring the
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 850 * original entry then copying as for a present pte. Device
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 851 * exclusive entries currently only support private writable
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 852 * (ie. COW) mappings.
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 853 */
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 854 VM_BUG_ON(!is_cow_mapping(src_vma->vm_flags));
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 855 if (try_restore_exclusive_pte(src_pte, src_vma, addr))
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 856 return -EBUSY;
b756a3b5e7ead8f6 Alistair Popple 2021-06-30 857 return -ENOENT;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 858 }
8f34f1eac3820fc2 Peter Xu 2021-06-30 859 if (!userfaultfd_wp(dst_vma))
8f34f1eac3820fc2 Peter Xu 2021-06-30 860 pte = pte_swp_clear_uffd_wp(pte);
df3a57d1f6072d07 Linus Torvalds 2020-09-23 861 set_pte_at(dst_mm, addr, dst_pte, pte);
df3a57d1f6072d07 Linus Torvalds 2020-09-23 862 return 0;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 863 }
^1da177e4c3f4152 Linus Torvalds 2005-04-16 864
:::::: The code at line 773 was first introduced by commit
:::::: df3a57d1f6072d07978bafa7dbd9904cdf8f3e13 mm: split out the non-present case from copy_one_pte()
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
drivers/dma/qcom/gpi.c:577:20: warning: unused function 'gpi_write_reg_field'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d999ade1cc86cd2951d41c11ea769cb4452c8811
commit: 5d0c3533a19f48e5e7e73806a3e4b29cd4364130 dmaengine: qcom: Add GPI dma driver
date: 11 months ago
config: arm64-randconfig-r004-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d0c3533a19f48e5e7e73806a3e4b29cd4364130
# 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 drivers/dma/qcom/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/dma/qcom/gpi.c:577:20: warning: unused function 'gpi_write_reg_field'
static inline void gpi_write_reg_field(struct gpii void __iomem
^
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/cross/clang-746dd6a700/bin/clang-14 -cc1 -triple aarch64-unknown-linux -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name gpi.c -mrelocation-model static -fno-delete-null-pointer-checks -fwarn-stack-size=2048 -mframe-pointer=non-leaf -relaxed-aliasing -mdisable-tail-calls -fmath-errno -fno-rounding-math -no-integrated-as -mconstructor-aliases -target-cpu generic -target-feature -fp-armv8 -target-feature -crypto -target-feature -neon -target-feature -sha2 -target-feature -aes -target-abi aapcs -mllvm -aarch64-enable-global-merge=false -msign-return-address=none -msign-return-address-key=a_key -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fno-dwarf-directory-asm -fcoverage-compilation-dir=/kbuild/obj/consumer/arm64-randconfig-r004-20211017 -nostdsysteminc -nobuiltininc -resource-dir /opt/cross/clang-746dd6a700/lib/clang/14.0.0 -dependency-file drivers/dma/qcom/.gpi.o.d -MT drivers/dma/qcom/gpi.o -isystem /opt/cross/clang-746dd6a700/lib/clang/14.0.0/include -include include/linux/kconfig.h -include include/linux/compiler_types.h -I arch/arm64/include -I ./arch/arm64/include/generated -I include -I ./include -I arch/arm64/include/uapi -I ./arch/arm64/include/generated/uapi -I include/uapi -I ./include/generated/uapi -D __KERNEL__ -D KASAN_SHADOW_SCALE_SHIFT=3 -D KBUILD_EXTRA_WARN1 -D CONFIG_CC_HAS_K_CONSTRAINT=1 -D ARM64_ASM_ARCH="armv8.4-a" -D KASAN_SHADOW_SCALE_SHIFT=3 -I drivers/dma/qcom -I ./drivers/dma/qcom -D KBUILD_MODFILE="drivers/dma/qcom/gpi" -D KBUILD_BASENAME="gpi" -D KBUILD_MODNAME="gpi" -fmacro-prefix-map== -O2 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -Werror=unknown-warning-option -Wno-psabi -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-format-invalid-specifier -Wno-gnu -Wno-unused-const-variable -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -std=gnu89 -fdebug-compilation-dir=/kbuild/obj/consumer/arm64-randconfig-r004-20211017 -ferror-limit 19 -fwrapv -ftrivial-auto-var-init=zero -fno-signed-char -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -o /tmp/gpi-0212f3.s -x c drivers/dma/qcom/gpi.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'drivers/dma/qcom/gpi.c'.
4. Running pass 'AArch64 MI Peephole Optimization pass' on function '@gpi_alloc_chan'
#0 0x00005564e6b82eff Signals.cpp:0:0
#1 0x00005564e6b8078e SignalHandler(int) Signals.cpp:0:0
#2 0x00007f5323be9140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#3 0x00005564e4a30173 (anonymous namespace)::AArch64MIPeepholeOpt::checkMovImmInstr(llvm::MachineInstr&, (.isra.69) AArch64MIPeepholeOpt.cpp:0:0
#4 0x00005564e4a330fc bool (anonymous namespace)::AArch64MIPeepholeOpt::visitADDSUB<unsigned long>(llvm::MachineInstr&, 8u>&, bool) AArch64MIPeepholeOpt.cpp:0:0
#5 0x00005564e4a367bc (anonymous namespace)::AArch64MIPeepholeOpt::runOnMachineFunction(llvm::MachineFunction&) (.part.81) AArch64MIPeepholeOpt.cpp:0:0
#6 0x00005564e5f32f7d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#7 0x00005564e6355c27 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c42c27)
#8 0x00005564e6355da1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c42da1)
#9 0x00005564e635707f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c4407f)
#10 0x00005564e6e6b07f clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-746dd6a700/bin/clang-14+0x375807f)
#11 0x00005564e7ae30a3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x43d00a3)
#12 0x00005564e85c4019 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-746dd6a700/bin/clang-14+0x4eb1019)
#13 0x00005564e7ae1f0f clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-746dd6a700/bin/clang-14+0x43cef0f)
#14 0x00005564e747bc21 clang::FrontendAction::Execute() (/opt/cross/clang-746dd6a700/bin/clang-14+0x3d68c21)
#15 0x00005564e741464a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x3d0164a)
#16 0x00005564e75447ab (/opt/cross/clang-746dd6a700/bin/clang-14+0x3e317ab)
#17 0x00005564e48dddb4 cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-746dd6a700/bin/clang-14+0x11cadb4)
#18 0x00005564e48db30b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#19 0x00005564e4807461 main (/opt/cross/clang-746dd6a700/bin/clang-14+0x10f4461)
#20 0x00007f53236e2d0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#21 0x00005564e48dae2a _start (/opt/cross/clang-746dd6a700/bin/clang-14+0x11c7e2a)
clang-14: error: unable to execute command: Segmentation fault
clang-14: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project 746dd6a700931988dd9021d3d04718f1929885a5)
Target: aarch64-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-746dd6a700/bin
clang-14: note: diagnostic msg:
Makefile arch drivers include kernel nr_bisected scripts source usr
vim +/gpi_write_reg_field +577 drivers/dma/qcom/gpi.c
575
576 /* gpi_write_reg_field - write to specific bit field */
> 577 static inline void gpi_write_reg_field(struct gpii *gpii, void __iomem *addr,
578 u32 mask, u32 shift, u32 val)
579 {
580 u32 tmp = gpi_read_reg(gpii, addr);
581
582 tmp &= ~mask;
583 val = tmp | ((val << shift) & mask);
584 gpi_write_reg(gpii, addr, val);
585 }
586
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[axboe-block:for-5.16/io_uring 78/79] fs/io_uring.c:5577:6: warning: variable 'rw' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.16/io_uring
head: 785d7baa96560c726b68d591a233532f1a203743
commit: 7070f9ad7468e52c5bd36c6270aa4c6466f6bbf3 [78/79] io_uring: arm poll for non-nowait files
config: i386-randconfig-r022-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/com...
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block for-5.16/io_uring
git checkout 7070f9ad7468e52c5bd36c6270aa4c6466f6bbf3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/io_uring.c:1489:61: warning: parameter 'locked' set but not used [-Wunused-but-set-parameter]
static void io_queue_async_work(struct io_kiocb *req, bool *locked)
^
>> fs/io_uring.c:5577:6: warning: variable 'rw' set but not used [-Wunused-but-set-variable]
int rw;
^
2 warnings generated.
vim +/rw +5577 fs/io_uring.c
59b735aeeb0f23 Olivier Langlois 2021-06-22 5569
59b735aeeb0f23 Olivier Langlois 2021-06-22 5570 static int io_arm_poll_handler(struct io_kiocb *req)
d7718a9d25a614 Jens Axboe 2020-02-14 5571 {
d7718a9d25a614 Jens Axboe 2020-02-14 5572 const struct io_op_def *def = &io_op_defs[req->opcode];
d7718a9d25a614 Jens Axboe 2020-02-14 5573 struct io_ring_ctx *ctx = req->ctx;
d7718a9d25a614 Jens Axboe 2020-02-14 5574 struct async_poll *apoll;
d7718a9d25a614 Jens Axboe 2020-02-14 5575 struct io_poll_table ipt;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5576 __poll_t ret, mask = EPOLLONESHOT | POLLERR | POLLPRI;
9dab14b81807a4 Jens Axboe 2020-08-25 @5577 int rw;
d7718a9d25a614 Jens Axboe 2020-02-14 5578
d7718a9d25a614 Jens Axboe 2020-02-14 5579 if (!req->file || !file_can_poll(req->file))
59b735aeeb0f23 Olivier Langlois 2021-06-22 5580 return IO_APOLL_ABORTED;
24c74678634b3c Pavel Begunkov 2020-06-21 5581 if (req->flags & REQ_F_POLLED)
59b735aeeb0f23 Olivier Langlois 2021-06-22 5582 return IO_APOLL_ABORTED;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5583 if (!def->pollin && !def->pollout)
b2d9c3da77115b Pavel Begunkov 2021-06-26 5584 return IO_APOLL_ABORTED;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5585
b2d9c3da77115b Pavel Begunkov 2021-06-26 5586 if (def->pollin) {
9dab14b81807a4 Jens Axboe 2020-08-25 5587 rw = READ;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5588 mask |= POLLIN | POLLRDNORM;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5589
b2d9c3da77115b Pavel Begunkov 2021-06-26 5590 /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */
b2d9c3da77115b Pavel Begunkov 2021-06-26 5591 if ((req->opcode == IORING_OP_RECVMSG) &&
b2d9c3da77115b Pavel Begunkov 2021-06-26 5592 (req->sr_msg.msg_flags & MSG_ERRQUEUE))
b2d9c3da77115b Pavel Begunkov 2021-06-26 5593 mask &= ~POLLIN;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5594 } else {
9dab14b81807a4 Jens Axboe 2020-08-25 5595 rw = WRITE;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5596 mask |= POLLOUT | POLLWRNORM;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5597 }
b2d9c3da77115b Pavel Begunkov 2021-06-26 5598
d7718a9d25a614 Jens Axboe 2020-02-14 5599 apoll = kmalloc(sizeof(*apoll), GFP_ATOMIC);
d7718a9d25a614 Jens Axboe 2020-02-14 5600 if (unlikely(!apoll))
59b735aeeb0f23 Olivier Langlois 2021-06-22 5601 return IO_APOLL_ABORTED;
807abcb0883439 Jens Axboe 2020-07-17 5602 apoll->double_poll = NULL;
d7718a9d25a614 Jens Axboe 2020-02-14 5603 req->apoll = apoll;
b2d9c3da77115b Pavel Begunkov 2021-06-26 5604 req->flags |= REQ_F_POLLED;
d7718a9d25a614 Jens Axboe 2020-02-14 5605 ipt.pt._qproc = io_async_queue_proc;
48dcd38d73c22b Pavel Begunkov 2021-08-15 5606 io_req_set_refcount(req);
d7718a9d25a614 Jens Axboe 2020-02-14 5607
d7718a9d25a614 Jens Axboe 2020-02-14 5608 ret = __io_arm_poll_handler(req, &apoll->poll, &ipt, mask,
d7718a9d25a614 Jens Axboe 2020-02-14 5609 io_async_wake);
79ebeaee8a21a0 Jens Axboe 2021-08-10 5610 spin_unlock(&ctx->completion_lock);
41a5169c23ebe8 Hao Xu 2021-08-12 5611 if (ret || ipt.error)
41a5169c23ebe8 Hao Xu 2021-08-12 5612 return ret ? IO_APOLL_READY : IO_APOLL_ABORTED;
41a5169c23ebe8 Hao Xu 2021-08-12 5613
236daeae3616b1 Olivier Langlois 2021-05-31 5614 trace_io_uring_poll_arm(ctx, req, req->opcode, req->user_data,
236daeae3616b1 Olivier Langlois 2021-05-31 5615 mask, apoll->poll.events);
59b735aeeb0f23 Olivier Langlois 2021-06-22 5616 return IO_APOLL_OK;
d7718a9d25a614 Jens Axboe 2020-02-14 5617 }
d7718a9d25a614 Jens Axboe 2020-02-14 5618
:::::: The code at line 5577 was first introduced by commit
:::::: 9dab14b81807a40dab8e464ec87043935c562c2c io_uring: don't use poll handler if file can't be nonblocking read/written
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week