mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Waiman Long <longman@redhat.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	tipbuild@zytor.com, Ingo Molnar <mingo@kernel.org>
Subject: [tip:WIP.locking/core 28/29] kernel/locking/rwsem.h:335:9: error: implicit declaration of function 'is_rwsem_owner_reader'; did you mean 'rwsem_owner_count'?
Date: Wed, 10 Apr 2019 18:50:35 +0800	[thread overview]
Message-ID: <201904101833.oAfkSbvr%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 10643 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.locking/core
head:   5c587ed687faed2eb0afdd669ddd167d0d940236
commit: 0d8bd477cd9602fb18bee6e3dae41c5fda9cebab [28/29] locking/rwsem: Merge owner into count on x86-64
config: riscv-tinyconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0d8bd477cd9602fb18bee6e3dae41c5fda9cebab
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=riscv 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from kernel/locking/rwsem.c:9:
   kernel/locking/rwsem.h: In function 'rwsem_set_nonspinnable':
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:255:17: note: in definition of macro '__READ_ONCE'
     union { typeof(x) __val; char __c[1]; } __u;   \
                    ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:257:22: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                         ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:257:42: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                                             ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:259:30: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                 ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:259:50: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                                     ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   In file included from kernel/locking/rwsem.c:16:
>> kernel/locking/rwsem.h:335:9: error: implicit declaration of function 'is_rwsem_owner_reader'; did you mean 'rwsem_owner_count'? [-Werror=implicit-function-declaration]
     while (is_rwsem_owner_reader((struct task_struct *)owner)) {
            ^~~~~~~~~~~~~~~~~~~~~
            rwsem_owner_count
   kernel/locking/rwsem.h:336:8: error: implicit declaration of function 'is_rwsem_owner_spinnable'; did you mean 'rwsem_set_nonspinnable'? [-Werror=implicit-function-declaration]
      if (!is_rwsem_owner_spinnable((struct task_struct *)owner))
           ^~~~~~~~~~~~~~~~~~~~~~~~
           rwsem_set_nonspinnable
   In file included from arch/riscv/include/asm/atomic.h:23,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel/locking/rwsem.c:10:
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:350:15: note: in definition of macro 'cmpxchg'
     __typeof__(*(ptr)) _o_ = (o);     \
                  ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:351:15: note: in definition of macro 'cmpxchg'
     __typeof__(*(ptr)) _n_ = (n);     \
                  ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:352:16: note: in definition of macro 'cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                   ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:312:13: note: in definition of macro '__cmpxchg'
     __typeof__(ptr) __ptr = (ptr);     \
                ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:312:27: note: in definition of macro '__cmpxchg'
     __typeof__(ptr) __ptr = (ptr);     \
                              ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:313:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __old = (old);    \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:314:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __new = (new);    \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:315:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __ret;     \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:317:10: note: in definition of macro '__cmpxchg'
     switch (size) {       \
             ^~~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   arch/riscv/include/asm/cmpxchg.h:326:41: error: invalid type argument of unary '*' (have 'int')
       : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
                                            ^~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   arch/riscv/include/asm/cmpxchg.h:338:41: error: invalid type argument of unary '*' (have 'int')
       : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
                                            ^~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \

vim +335 kernel/locking/rwsem.h

12a30a7f Waiman Long 2019-04-04  326  
46ad0840 Waiman Long 2019-03-22  327  /*
2d6f2f61 Waiman Long 2019-04-05  328   * Set the RWSEM_ANONYMOUSLY_OWNED flag if the RWSEM_READER_OWNED flag
2d6f2f61 Waiman Long 2019-04-05  329   * remains set. Otherwise, the operation will be aborted.
2d6f2f61 Waiman Long 2019-04-05  330   */
2d6f2f61 Waiman Long 2019-04-05  331  static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)
2d6f2f61 Waiman Long 2019-04-05  332  {
2d6f2f61 Waiman Long 2019-04-05 @333  	long owner = (long)READ_ONCE(sem->owner);
2d6f2f61 Waiman Long 2019-04-05  334  
2d6f2f61 Waiman Long 2019-04-05 @335  	while (is_rwsem_owner_reader((struct task_struct *)owner)) {
2d6f2f61 Waiman Long 2019-04-05  336  		if (!is_rwsem_owner_spinnable((struct task_struct *)owner))
2d6f2f61 Waiman Long 2019-04-05  337  			break;
2d6f2f61 Waiman Long 2019-04-05  338  		owner = cmpxchg((long *)&sem->owner, owner,
2d6f2f61 Waiman Long 2019-04-05  339  				owner | RWSEM_ANONYMOUSLY_OWNED);
2d6f2f61 Waiman Long 2019-04-05  340  	}
2d6f2f61 Waiman Long 2019-04-05  341  }
2d6f2f61 Waiman Long 2019-04-05  342  

:::::: The code at line 335 was first introduced by commit
:::::: 2d6f2f61367455179ee140b3d4af6974d3e5d06d locking/rwsem: Enable time-based spinning on reader-owned rwsem

:::::: TO: Waiman Long <longman@redhat.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 4614 bytes --]

                 reply	other threads:[~2019-04-10 10:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201904101833.oAfkSbvr%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=tipbuild@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®