tree:
https://github.com/norov/linux find_bit_static
head: a18d2664b9ad8a08be90d073ef0673f62d8a186e
commit: 850a7ee8fc507b8514365891d451a21d29f43f9f [4/6] lib: add fast path for
find_next_*_bit()
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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/norov/linux/commit/850a7ee8fc507b8514365891d451a21d29f...
git remote add norov
https://github.com/norov/linux
git fetch --no-tags norov find_bit_static
git checkout 850a7ee8fc507b8514365891d451a21d29f43f9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h: In function 'find_next_and_bit':
> include/asm-generic/bitops/find.h:60:16: error: implicit
declaration of function '__ffs' [-Werror=implicit-function-declaration]
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/m68k/include/asm/bitops.h: At top level:
> arch/m68k/include/asm/bitops.h:497:29: error: conflicting types
for '__ffs'
497 | static inline unsigned long __ffs(unsigned long x)
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h:60:16: note: previous implicit declaration of
'__ffs' was here
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/le.h: In function 'find_next_zero_bit_le':
include/asm-generic/bitops/le.h:45:17: warning: dereferencing 'void *' pointer
45 | fz = ffz(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:45:17: error: void value not ignored as it ought to be
include/asm-generic/bitops/le.h: In function 'find_next_bit_le':
include/asm-generic/bitops/le.h:64:19: warning: dereferencing 'void *' pointer
64 | fs = __ffs(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:64:19: error: void value not ignored as it ought to be
cc1: some warnings being treated as errors
--
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from kernel//locking/locktorture.c:14:
include/asm-generic/bitops/find.h: In function 'find_next_and_bit':
> include/asm-generic/bitops/find.h:60:16: error: implicit
declaration of function '__ffs' [-Werror=implicit-function-declaration]
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from kernel//locking/locktorture.c:14:
arch/m68k/include/asm/bitops.h: At top level:
> arch/m68k/include/asm/bitops.h:497:29: error: conflicting types
for '__ffs'
497 | static inline unsigned long __ffs(unsigned long x)
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from kernel//locking/locktorture.c:14:
include/asm-generic/bitops/find.h:60:16: note: previous implicit declaration of
'__ffs' was here
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from kernel//locking/locktorture.c:14:
include/asm-generic/bitops/le.h: In function 'find_next_zero_bit_le':
include/asm-generic/bitops/le.h:45:17: warning: dereferencing 'void *' pointer
45 | fz = ffz(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:45:17: error: void value not ignored as it ought to be
include/asm-generic/bitops/le.h: In function 'find_next_bit_le':
include/asm-generic/bitops/le.h:64:19: warning: dereferencing 'void *' pointer
64 | fs = __ffs(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:64:19: error: void value not ignored as it ought to be
In file included from include/linux/mmzone.h:19,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from kernel//locking/locktorture.c:15:
include/linux/page-flags-layout.h: At top level:
include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file
or directory
6 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from kernel//time/test_udelay.c:13:
include/asm-generic/bitops/find.h: In function 'find_next_and_bit':
> include/asm-generic/bitops/find.h:60:16: error: implicit
declaration of function '__ffs' [-Werror=implicit-function-declaration]
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from kernel//time/test_udelay.c:13:
arch/m68k/include/asm/bitops.h: At top level:
> arch/m68k/include/asm/bitops.h:497:29: error: conflicting types
for '__ffs'
497 | static inline unsigned long __ffs(unsigned long x)
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from kernel//time/test_udelay.c:13:
include/asm-generic/bitops/find.h:60:16: note: previous implicit declaration of
'__ffs' was here
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from kernel//time/test_udelay.c:13:
include/asm-generic/bitops/le.h: In function 'find_next_zero_bit_le':
include/asm-generic/bitops/le.h:45:17: warning: dereferencing 'void *' pointer
45 | fz = ffz(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:45:17: error: void value not ignored as it ought to be
include/asm-generic/bitops/le.h: In function 'find_next_bit_le':
include/asm-generic/bitops/le.h:64:19: warning: dereferencing 'void *' pointer
64 | fs = __ffs(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:64:19: error: void value not ignored as it ought to be
In file included from include/linux/dcache.h:14,
from include/linux/fs.h:8,
from include/linux/debugfs.h:15,
from kernel//time/test_udelay.c:13:
include/linux/lockref.h: At top level:
include/linux/lockref.h:19:10: fatal error: generated/bounds.h: No such file or
directory
19 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h: In function 'find_next_and_bit':
> include/asm-generic/bitops/find.h:60:16: error: implicit
declaration of function '__ffs' [-Werror=implicit-function-declaration]
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/m68k/include/asm/bitops.h: At top level:
> arch/m68k/include/asm/bitops.h:497:29: error: conflicting types
for '__ffs'
497 | static inline unsigned long __ffs(unsigned long x)
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h:60:16: note: previous implicit declaration of
'__ffs' was here
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/le.h: In function 'find_next_zero_bit_le':
include/asm-generic/bitops/le.h:45:17: warning: dereferencing 'void *' pointer
45 | fz = ffz(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:45:17: error: void value not ignored as it ought to be
include/asm-generic/bitops/le.h: In function 'find_next_bit_le':
include/asm-generic/bitops/le.h:64:19: warning: dereferencing 'void *' pointer
64 | fs = __ffs(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:64:19: error: void value not ignored as it ought to be
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1220: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h: In function 'find_next_and_bit':
> include/asm-generic/bitops/find.h:60:16: error: implicit
declaration of function '__ffs' [-Werror=implicit-function-declaration]
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/m68k/include/asm/bitops.h: At top level:
> arch/m68k/include/asm/bitops.h:497:29: error: conflicting types
for '__ffs'
497 | static inline unsigned long __ffs(unsigned long x)
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:443,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/find.h:60:16: note: previous implicit declaration of
'__ffs' was here
60 | return val ? __ffs(val) : size;
| ^~~~~
In file included from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:47,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/le.h: In function 'find_next_zero_bit_le':
include/asm-generic/bitops/le.h:45:17: warning: dereferencing 'void *' pointer
45 | fz = ffz(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:45:17: error: void value not ignored as it ought to be
include/asm-generic/bitops/le.h: In function 'find_next_bit_le':
include/asm-generic/bitops/le.h:64:19: warning: dereferencing 'void *' pointer
64 | fs = __ffs(swab(*addr & BITMAP_FIRST_WORD_MASK(offset)));
| ^~~~~
include/asm-generic/bitops/le.h:64:19: error: void value not ignored as it ought to be
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1220: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/__ffs +60 include/asm-generic/bitops/find.h
34
35 #ifndef find_next_and_bit
36 /**
37 * find_next_and_bit - find the next set bit in both memory regions
38 * @addr1: The first address to base the search on
39 * @addr2: The second address to base the search on
40 * @offset: The bitnumber to start searching at
41 * @size: The bitmap size in bits
42 *
43 * Returns the bit number for the next set bit
44 * If no bits are set, returns @size.
45 */
46 static __always_inline
47 unsigned long find_next_and_bit(const unsigned long *addr1,
48 const unsigned long *addr2, unsigned long size,
49 unsigned long offset)
50 {
51 if (small_const_nbits(size)) {
52 unsigned long val;
53
54 if (unlikely(offset >= size))
55 return size;
56
57 val = *addr1 & *addr2 & BITMAP_FIRST_WORD_MASK(offset)
58 & BITMAP_LAST_WORD_MASK(size);
59
60 return val ? __ffs(val) : size;
61 }
62
63 return _find_next_bit(addr1, addr2, size, offset, 0UL, 0);
64 }
65 #endif
66
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org