tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: 314f035f38352a3100692753bd9b2356fb068cbe
commit: 314f035f38352a3100692753bd9b2356fb068cbe [3/3] lockdep: Noinstr annotate
warn_bogus_irq_restore()
config: mips-randconfig-r033-20210209 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
c9439ca36342fb6013187d0a69aef92736951476)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/core
git checkout 314f035f38352a3100692753bd9b2356fb068cbe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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/mips/lib/bitops.c:31:2: error: implicit declaration of
function 'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
> arch/mips/lib/bitops.c:31:2: error: implicit declaration of
function 'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro 'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:31:2: note: did you mean 'instrumentation_begin'?
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:31:2: note: 'instrumentation_begin' declared here
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:52:2: error: implicit declaration of function
'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:52:2: error: implicit declaration of function
'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:73:2: error: implicit declaration of function
'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:73:2: error: implicit declaration of function
'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:97:2: error: implicit declaration of function
'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:97:2: error: implicit declaration of function
'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:121:2: error: implicit declaration of function
'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:121:2: error: implicit declaration of function
'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/lib/bitops.c:145:2: error: implicit declaration of function
'instrumentation_begin' [-Werror,-Wimplicit-function-declaration]
raw_local_irq_restore(flags);
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
arch/mips/lib/bitops.c:145:2: error: implicit declaration of function
'instrumentation_end' [-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
--
arch/mips/include/asm/octeon/cvmx-bootinfo.h:400:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:400:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:401:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E200)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:401:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:402:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E220)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:402:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:403:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:403:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:404:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KONTRON_S1901)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:404:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:405:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:405:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:320:20: note: expanded from macro
'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:416:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:416:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:417:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_CHIP_TYPE_CASE(CVMX_CHIP_SIM_TYPE_DEPRECATED)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:417:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:418:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_OCTEON_SAMPLE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:418:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
^
arch/mips/include/asm/octeon/cvmx-bootinfo.h:419:3: warning: adding 'int' to a
string does not append to the string [-Wstring-plus-int]
ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_MAX)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
~~~^~~~
arch/mips/include/asm/octeon/cvmx-bootinfo.h:419:3: note: use array indexing to silence
this warning
arch/mips/include/asm/octeon/cvmx-bootinfo.h:411:20: note: expanded from macro
'ENUM_CHIP_TYPE_CASE'
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
^
> arch/mips/cavium-octeon/executive/cvmx-l2c.c:644:2: error:
implicit declaration of function 'instrumentation_begin'
[-Werror,-Wimplicit-function-declaration]
local_irq_restore(flags);
^
include/linux/irqflags.h:226:3: note: expanded from macro 'local_irq_restore'
raw_local_irq_restore(flags); \
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
> arch/mips/cavium-octeon/executive/cvmx-l2c.c:644:2: error:
implicit declaration of function 'instrumentation_end'
[-Werror,-Wimplicit-function-declaration]
include/linux/irqflags.h:226:3: note:
expanded from macro 'local_irq_restore'
raw_local_irq_restore(flags); \
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/cavium-octeon/executive/cvmx-l2c.c:644:2: note: did you mean
'instrumentation_begin'?
include/linux/irqflags.h:226:3: note: expanded from macro 'local_irq_restore'
raw_local_irq_restore(flags); \
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:159:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_end(); \
^
arch/mips/cavium-octeon/executive/cvmx-l2c.c:644:2: note:
'instrumentation_begin' declared here
include/linux/irqflags.h:226:3: note: expanded from macro 'local_irq_restore'
raw_local_irq_restore(flags); \
^
include/linux/irqflags.h:179:3: note: expanded from macro
'raw_local_irq_restore'
raw_check_bogus_irq_restore(); \
^
include/linux/irqflags.h:157:4: note: expanded from macro
'raw_check_bogus_irq_restore'
instrumentation_begin(); \
^
81 warnings and 2 errors generated.
vim +/instrumentation_begin +31 arch/mips/lib/bitops.c
92d11594f688c8b Jim Quinlan 2012-09-06 13
92d11594f688c8b Jim Quinlan 2012-09-06 14
92d11594f688c8b Jim Quinlan 2012-09-06 15 /**
92d11594f688c8b Jim Quinlan 2012-09-06 16 * __mips_set_bit - Atomically set a bit in
memory. This is called by
92d11594f688c8b Jim Quinlan 2012-09-06 17 * set_bit() if it cannot find a faster
solution.
92d11594f688c8b Jim Quinlan 2012-09-06 18 * @nr: the bit to set
92d11594f688c8b Jim Quinlan 2012-09-06 19 * @addr: the address to start counting from
92d11594f688c8b Jim Quinlan 2012-09-06 20 */
92d11594f688c8b Jim Quinlan 2012-09-06 21 void __mips_set_bit(unsigned long nr, volatile
unsigned long *addr)
92d11594f688c8b Jim Quinlan 2012-09-06 22 {
c042be02d730534 Paul Burton 2019-10-01 23 volatile unsigned long *a =
&addr[BIT_WORD(nr)];
c042be02d730534 Paul Burton 2019-10-01 24 unsigned int bit = nr % BITS_PER_LONG;
92d11594f688c8b Jim Quinlan 2012-09-06 25 unsigned long mask;
92d11594f688c8b Jim Quinlan 2012-09-06 26 unsigned long flags;
92d11594f688c8b Jim Quinlan 2012-09-06 27
92d11594f688c8b Jim Quinlan 2012-09-06 28 mask = 1UL << bit;
92d11594f688c8b Jim Quinlan 2012-09-06 29 raw_local_irq_save(flags);
92d11594f688c8b Jim Quinlan 2012-09-06 30 *a |= mask;
92d11594f688c8b Jim Quinlan 2012-09-06 @31 raw_local_irq_restore(flags);
92d11594f688c8b Jim Quinlan 2012-09-06 32 }
92d11594f688c8b Jim Quinlan 2012-09-06 33 EXPORT_SYMBOL(__mips_set_bit);
92d11594f688c8b Jim Quinlan 2012-09-06 34
92d11594f688c8b Jim Quinlan 2012-09-06 35
:::::: The code at line 31 was first introduced by commit
:::::: 92d11594f688c8b55b51e80f2eac4417396237a4 MIPS: Remove irqflags.h dependency from
bitops.h
:::::: TO: Jim Quinlan <jim2101024(a)gmail.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org