lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 26 Aug 2020 08:25:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: include/linux/spinlock_api_smp.h:90:3: error: implicit declaration
 of function 'spin_acquire'; did you mean

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   abb3438d69fb6dd5baa4ae23eafbf5b87945eff1
commit: 0cd39f4600ed4de859383018eb10f0f724900e1b locking/seqlock, headers: Untangle the spaghetti monster
date:   3 weeks ago
config: sh-j2_defconfig (attached as .config)
compiler: sh4-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
        git checkout 0cd39f4600ed4de859383018eb10f0f724900e1b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/spinlock.h:318,
                    from arch/sh/include/asm/smp.h:11,
                    from include/linux/smp.h:82,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel//sched/sched.h:5,
                    from kernel//sched/core.c:9:
   include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock':
>> include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function 'spin_acquire'; did you mean 'xchg_acquire'? [-Werror=implicit-function-declaration]
      90 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~
         |   xchg_acquire
   include/linux/spinlock_api_smp.h:90:21: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
      90 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                     ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irqsave':
   include/linux/spinlock_api_smp.h:110:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     110 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq':
   include/linux/spinlock_api_smp.h:128:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     128 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
>> include/linux/spinlock_api_smp.h:129:2: error: implicit declaration of function 'LOCK_CONTENDED' [-Werror=implicit-function-declaration]
     129 |  LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
         |  ^~~~~~~~~~~~~~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_bh':
   include/linux/spinlock_api_smp.h:135:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     135 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock':
   include/linux/spinlock_api_smp.h:142:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     142 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock':
>> include/linux/spinlock_api_smp.h:150:2: error: implicit declaration of function 'spin_release'; did you mean 'xchg_release'? [-Werror=implicit-function-declaration]
     150 |  spin_release(&lock->dep_map, _RET_IP_);
         |  ^~~~~~~~~~~~
         |  xchg_release
   include/linux/spinlock_api_smp.h:150:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     150 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irqrestore':
   include/linux/spinlock_api_smp.h:158:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     158 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irq':
   include/linux/spinlock_api_smp.h:166:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     166 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_bh':
   include/linux/spinlock_api_smp.h:174:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     174 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock_bh':
   include/linux/spinlock_api_smp.h:183:21: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     183 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                     ^~
   In file included from include/linux/spinlock_api_smp.h:190,
                    from include/linux/spinlock.h:318,
                    from arch/sh/include/asm/smp.h:11,
                    from include/linux/smp.h:82,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel//sched/sched.h:5,
                    from kernel//sched/core.c:9:
   include/linux/rwlock_api_smp.h: In function '__raw_read_trylock':
>> include/linux/rwlock_api_smp.h:121:3: error: implicit declaration of function 'rwlock_acquire_read' [-Werror=implicit-function-declaration]
     121 |   rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:121:28: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     121 |   rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_);
         |                            ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_trylock':
>> include/linux/rwlock_api_smp.h:132:3: error: implicit declaration of function 'rwlock_acquire' [-Werror=implicit-function-declaration]
     132 |   rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:132:23: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     132 |   rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                       ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock':
   include/linux/rwlock_api_smp.h:149:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     149 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:150:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     150 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:150:23: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/rwlock_api_smp.h:150:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     150 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_irqsave':
   include/linux/rwlock_api_smp.h:159:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     159 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
>> include/linux/rwlock_api_smp.h:160:2: error: implicit declaration of function 'LOCK_CONTENDED_FLAGS' [-Werror=implicit-function-declaration]
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:160:29: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |                             ^~~~~~~~~~~~~~~~~~~
         |                             _raw_read_trylock
   include/linux/rwlock_api_smp.h:160:50: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |                                                  ^~~~~~~~~~~~~~~~
         |                                                  _raw_read_lock
>> include/linux/rwlock_api_smp.h:161:9: error: 'do_raw_read_lock_flags' undeclared (first use in this function); did you mean 'do_raw_spin_lock_flags'?
     161 |         do_raw_read_lock_flags, &flags);
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         do_raw_spin_lock_flags
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_irq':
   include/linux/rwlock_api_smp.h:169:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     169 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:170:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     170 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:170:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     170 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_bh':
   include/linux/rwlock_api_smp.h:176:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     176 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:177:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     177 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:177:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     177 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_irqsave':
   include/linux/rwlock_api_smp.h:186:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     186 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:187:29: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     187 |  LOCK_CONTENDED_FLAGS(lock, do_raw_write_trylock, do_raw_write_lock,
         |                             ^~~~~~~~~~~~~~~~~~~~
         |                             _raw_write_trylock
   include/linux/rwlock_api_smp.h:187:51: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     187 |  LOCK_CONTENDED_FLAGS(lock, do_raw_write_trylock, do_raw_write_lock,
         |                                                   ^~~~~~~~~~~~~~~~~
         |                                                   _raw_write_lock
>> include/linux/rwlock_api_smp.h:188:9: error: 'do_raw_write_lock_flags' undeclared (first use in this function); did you mean 'do_raw_spin_lock_flags'?
     188 |         do_raw_write_lock_flags, &flags);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         do_raw_spin_lock_flags
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_irq':
   include/linux/rwlock_api_smp.h:196:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     196 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:197:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     197 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:197:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     197 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_bh':
   include/linux/rwlock_api_smp.h:203:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     203 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:204:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     204 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:204:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     204 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock':
   include/linux/rwlock_api_smp.h:210:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     210 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:211:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     211 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:211:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     211 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock':
>> include/linux/rwlock_api_smp.h:218:2: error: implicit declaration of function 'rwlock_release' [-Werror=implicit-function-declaration]
     218 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |  ^~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:218:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     218 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock':
   include/linux/rwlock_api_smp.h:225:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     225 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_irqrestore':
   include/linux/rwlock_api_smp.h:233:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     233 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_irq':
   include/linux/rwlock_api_smp.h:241:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     241 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_bh':
   include/linux/rwlock_api_smp.h:249:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     249 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_irqrestore':
   include/linux/rwlock_api_smp.h:257:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     257 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_irq':
   include/linux/rwlock_api_smp.h:265:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     265 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_bh':
   include/linux/rwlock_api_smp.h:273:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     273 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   kernel//sched/core.c: At top level:
   kernel//sched/core.c:2111:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
    2111 | void sched_set_stop_task(int cpu, struct task_struct *stop)
         |      ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/spinlock.h:318,
                    from arch/sh/include/asm/smp.h:11,
                    from include/linux/smp.h:82,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel//sched/sched.h:5,
                    from kernel//sched/loadavg.c:9:
   include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock':
>> include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function 'spin_acquire'; did you mean 'xchg_acquire'? [-Werror=implicit-function-declaration]
      90 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~
         |   xchg_acquire
   include/linux/spinlock_api_smp.h:90:21: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
      90 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                     ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irqsave':
   include/linux/spinlock_api_smp.h:110:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     110 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq':
   include/linux/spinlock_api_smp.h:128:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     128 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
>> include/linux/spinlock_api_smp.h:129:2: error: implicit declaration of function 'LOCK_CONTENDED' [-Werror=implicit-function-declaration]
     129 |  LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
         |  ^~~~~~~~~~~~~~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_bh':
   include/linux/spinlock_api_smp.h:135:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     135 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_lock':
   include/linux/spinlock_api_smp.h:142:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     142 |  spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock':
>> include/linux/spinlock_api_smp.h:150:2: error: implicit declaration of function 'spin_release'; did you mean 'xchg_release'? [-Werror=implicit-function-declaration]
     150 |  spin_release(&lock->dep_map, _RET_IP_);
         |  ^~~~~~~~~~~~
         |  xchg_release
   include/linux/spinlock_api_smp.h:150:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     150 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irqrestore':
   include/linux/spinlock_api_smp.h:158:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     158 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irq':
   include/linux/spinlock_api_smp.h:166:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     166 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_bh':
   include/linux/spinlock_api_smp.h:174:20: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     174 |  spin_release(&lock->dep_map, _RET_IP_);
         |                    ^~
   include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock_bh':
   include/linux/spinlock_api_smp.h:183:21: error: 'raw_spinlock_t' {aka 'struct raw_spinlock'} has no member named 'dep_map'
     183 |   spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                     ^~
   In file included from include/linux/spinlock_api_smp.h:190,
                    from include/linux/spinlock.h:318,
                    from arch/sh/include/asm/smp.h:11,
                    from include/linux/smp.h:82,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel//sched/sched.h:5,
                    from kernel//sched/loadavg.c:9:
   include/linux/rwlock_api_smp.h: In function '__raw_read_trylock':
>> include/linux/rwlock_api_smp.h:121:3: error: implicit declaration of function 'rwlock_acquire_read' [-Werror=implicit-function-declaration]
     121 |   rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:121:28: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     121 |   rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_);
         |                            ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_trylock':
>> include/linux/rwlock_api_smp.h:132:3: error: implicit declaration of function 'rwlock_acquire' [-Werror=implicit-function-declaration]
     132 |   rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |   ^~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:132:23: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     132 |   rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_);
         |                       ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock':
   include/linux/rwlock_api_smp.h:149:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     149 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:150:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     150 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:150:23: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/rwlock_api_smp.h:150:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     150 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_irqsave':
   include/linux/rwlock_api_smp.h:159:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     159 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
>> include/linux/rwlock_api_smp.h:160:2: error: implicit declaration of function 'LOCK_CONTENDED_FLAGS' [-Werror=implicit-function-declaration]
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:160:29: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |                             ^~~~~~~~~~~~~~~~~~~
         |                             _raw_read_trylock
   include/linux/rwlock_api_smp.h:160:50: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     160 |  LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
         |                                                  ^~~~~~~~~~~~~~~~
         |                                                  _raw_read_lock
>> include/linux/rwlock_api_smp.h:161:9: error: 'do_raw_read_lock_flags' undeclared (first use in this function); did you mean 'do_raw_spin_lock_flags'?
     161 |         do_raw_read_lock_flags, &flags);
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         do_raw_spin_lock_flags
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_irq':
   include/linux/rwlock_api_smp.h:169:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     169 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:170:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     170 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:170:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     170 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_read_lock_bh':
   include/linux/rwlock_api_smp.h:176:27: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     176 |  rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
         |                           ^~
   include/linux/rwlock_api_smp.h:177:23: error: 'do_raw_read_trylock' undeclared (first use in this function); did you mean '_raw_read_trylock'?
     177 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                       ^~~~~~~~~~~~~~~~~~~
         |                       _raw_read_trylock
   include/linux/rwlock_api_smp.h:177:44: error: 'do_raw_read_lock' undeclared (first use in this function); did you mean '_raw_read_lock'?
     177 |  LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
         |                                            ^~~~~~~~~~~~~~~~
         |                                            _raw_read_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_irqsave':
   include/linux/rwlock_api_smp.h:186:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     186 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:187:29: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     187 |  LOCK_CONTENDED_FLAGS(lock, do_raw_write_trylock, do_raw_write_lock,
         |                             ^~~~~~~~~~~~~~~~~~~~
         |                             _raw_write_trylock
   include/linux/rwlock_api_smp.h:187:51: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     187 |  LOCK_CONTENDED_FLAGS(lock, do_raw_write_trylock, do_raw_write_lock,
         |                                                   ^~~~~~~~~~~~~~~~~
         |                                                   _raw_write_lock
>> include/linux/rwlock_api_smp.h:188:9: error: 'do_raw_write_lock_flags' undeclared (first use in this function); did you mean 'do_raw_spin_lock_flags'?
     188 |         do_raw_write_lock_flags, &flags);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         do_raw_spin_lock_flags
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_irq':
   include/linux/rwlock_api_smp.h:196:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     196 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:197:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     197 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:197:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     197 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock_bh':
   include/linux/rwlock_api_smp.h:203:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     203 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:204:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     204 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:204:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     204 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_lock':
   include/linux/rwlock_api_smp.h:210:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     210 |  rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h:211:23: error: 'do_raw_write_trylock' undeclared (first use in this function); did you mean '_raw_write_trylock'?
     211 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       _raw_write_trylock
   include/linux/rwlock_api_smp.h:211:45: error: 'do_raw_write_lock' undeclared (first use in this function); did you mean '_raw_write_lock'?
     211 |  LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
         |                                             ^~~~~~~~~~~~~~~~~
         |                                             _raw_write_lock
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock':
>> include/linux/rwlock_api_smp.h:218:2: error: implicit declaration of function 'rwlock_release' [-Werror=implicit-function-declaration]
     218 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |  ^~~~~~~~~~~~~~
   include/linux/rwlock_api_smp.h:218:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     218 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock':
   include/linux/rwlock_api_smp.h:225:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     225 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_irqrestore':
   include/linux/rwlock_api_smp.h:233:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     233 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_irq':
   include/linux/rwlock_api_smp.h:241:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     241 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_read_unlock_bh':
   include/linux/rwlock_api_smp.h:249:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     249 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_irqrestore':
   include/linux/rwlock_api_smp.h:257:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     257 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_irq':
   include/linux/rwlock_api_smp.h:265:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     265 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   include/linux/rwlock_api_smp.h: In function '__raw_write_unlock_bh':
   include/linux/rwlock_api_smp.h:273:22: error: 'rwlock_t' {aka 'struct <anonymous>'} has no member named 'dep_map'
     273 |  rwlock_release(&lock->dep_map, _RET_IP_);
         |                      ^~
   cc1: some warnings being treated as errors
..

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cd39f4600ed4de859383018eb10f0f724900e1b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0cd39f4600ed4de859383018eb10f0f724900e1b
vim +90 include/linux/spinlock_api_smp.h

892a7c67c12da63 Heiko Carstens  2009-08-31   85  
9c1721aa4994f66 Thomas Gleixner 2009-12-03   86  static inline int __raw_spin_trylock(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31   87  {
69d0ee7377eef80 Heiko Carstens  2009-08-31   88  	preempt_disable();
9828ea9d75c38fe Thomas Gleixner 2009-12-03   89  	if (do_raw_spin_trylock(lock)) {
69d0ee7377eef80 Heiko Carstens  2009-08-31  @90  		spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
69d0ee7377eef80 Heiko Carstens  2009-08-31   91  		return 1;
69d0ee7377eef80 Heiko Carstens  2009-08-31   92  	}
69d0ee7377eef80 Heiko Carstens  2009-08-31   93  	preempt_enable();
69d0ee7377eef80 Heiko Carstens  2009-08-31   94  	return 0;
69d0ee7377eef80 Heiko Carstens  2009-08-31   95  }
69d0ee7377eef80 Heiko Carstens  2009-08-31   96  
69d0ee7377eef80 Heiko Carstens  2009-08-31   97  /*
69d0ee7377eef80 Heiko Carstens  2009-08-31   98   * If lockdep is enabled then we use the non-preemption spin-ops
27972765bd0410f Thomas Gleixner 2019-07-26   99   * even on CONFIG_PREEMPTION, because lockdep assumes that interrupts are
69d0ee7377eef80 Heiko Carstens  2009-08-31  100   * not re-enabled during lock-acquire (which the preempt-spin-ops do):
69d0ee7377eef80 Heiko Carstens  2009-08-31  101   */
69d0ee7377eef80 Heiko Carstens  2009-08-31  102  #if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)
69d0ee7377eef80 Heiko Carstens  2009-08-31  103  
9c1721aa4994f66 Thomas Gleixner 2009-12-03  104  static inline unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31  105  {
69d0ee7377eef80 Heiko Carstens  2009-08-31  106  	unsigned long flags;
69d0ee7377eef80 Heiko Carstens  2009-08-31  107  
69d0ee7377eef80 Heiko Carstens  2009-08-31  108  	local_irq_save(flags);
69d0ee7377eef80 Heiko Carstens  2009-08-31  109  	preempt_disable();
69d0ee7377eef80 Heiko Carstens  2009-08-31  110  	spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
69d0ee7377eef80 Heiko Carstens  2009-08-31  111  	/*
69d0ee7377eef80 Heiko Carstens  2009-08-31  112  	 * On lockdep we dont want the hand-coded irq-enable of
9828ea9d75c38fe Thomas Gleixner 2009-12-03  113  	 * do_raw_spin_lock_flags() code, because lockdep assumes
69d0ee7377eef80 Heiko Carstens  2009-08-31  114  	 * that interrupts are not re-enabled during lock-acquire:
69d0ee7377eef80 Heiko Carstens  2009-08-31  115  	 */
69d0ee7377eef80 Heiko Carstens  2009-08-31  116  #ifdef CONFIG_LOCKDEP
9828ea9d75c38fe Thomas Gleixner 2009-12-03  117  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
69d0ee7377eef80 Heiko Carstens  2009-08-31  118  #else
9828ea9d75c38fe Thomas Gleixner 2009-12-03  119  	do_raw_spin_lock_flags(lock, &flags);
69d0ee7377eef80 Heiko Carstens  2009-08-31  120  #endif
69d0ee7377eef80 Heiko Carstens  2009-08-31  121  	return flags;
69d0ee7377eef80 Heiko Carstens  2009-08-31  122  }
69d0ee7377eef80 Heiko Carstens  2009-08-31  123  
9c1721aa4994f66 Thomas Gleixner 2009-12-03  124  static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31  125  {
69d0ee7377eef80 Heiko Carstens  2009-08-31  126  	local_irq_disable();
69d0ee7377eef80 Heiko Carstens  2009-08-31  127  	preempt_disable();
69d0ee7377eef80 Heiko Carstens  2009-08-31  128  	spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
9828ea9d75c38fe Thomas Gleixner 2009-12-03 @129  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
69d0ee7377eef80 Heiko Carstens  2009-08-31  130  }
69d0ee7377eef80 Heiko Carstens  2009-08-31  131  
9c1721aa4994f66 Thomas Gleixner 2009-12-03  132  static inline void __raw_spin_lock_bh(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31  133  {
9ea4c380066fbe2 Peter Zijlstra  2013-11-19  134  	__local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
69d0ee7377eef80 Heiko Carstens  2009-08-31  135  	spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
9828ea9d75c38fe Thomas Gleixner 2009-12-03  136  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
69d0ee7377eef80 Heiko Carstens  2009-08-31  137  }
69d0ee7377eef80 Heiko Carstens  2009-08-31  138  
9c1721aa4994f66 Thomas Gleixner 2009-12-03  139  static inline void __raw_spin_lock(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31  140  {
69d0ee7377eef80 Heiko Carstens  2009-08-31  141  	preempt_disable();
69d0ee7377eef80 Heiko Carstens  2009-08-31  142  	spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
9828ea9d75c38fe Thomas Gleixner 2009-12-03  143  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
69d0ee7377eef80 Heiko Carstens  2009-08-31  144  }
69d0ee7377eef80 Heiko Carstens  2009-08-31  145  
ae58403f15888da Chen Gang       2013-06-19  146  #endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */
69d0ee7377eef80 Heiko Carstens  2009-08-31  147  
9c1721aa4994f66 Thomas Gleixner 2009-12-03  148  static inline void __raw_spin_unlock(raw_spinlock_t *lock)
69d0ee7377eef80 Heiko Carstens  2009-08-31  149  {
5facae4f3549b5c Qian Cai        2019-09-19 @150  	spin_release(&lock->dep_map, _RET_IP_);
9828ea9d75c38fe Thomas Gleixner 2009-12-03  151  	do_raw_spin_unlock(lock);
69d0ee7377eef80 Heiko Carstens  2009-08-31  152  	preempt_enable();
69d0ee7377eef80 Heiko Carstens  2009-08-31  153  }
69d0ee7377eef80 Heiko Carstens  2009-08-31  154  

:::::: The code at line 90 was first introduced by commit
:::::: 69d0ee7377eef808e34ba5542b554ec97244b871 locking: Move spinlock function bodies to header file

:::::: TO: Heiko Carstens <heiko.carstens@...ibm.com>
:::::: CC: Ingo Molnar <mingo@...e.hu>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (13065 bytes)

Powered by blists - more mailing lists