[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201904101847.VwZ7WwfV%lkp@intel.com>
Date: Wed, 10 Apr 2019 18:55:56 +0800
From: kbuild test robot <lkp@...el.com>
To: Waiman Long <longman@...hat.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
tipbuild@...or.com, Ingo Molnar <mingo@...nel.org>
Subject: [tip:WIP.locking/core 25/29] kernel/locking/rwsem.h:203:34: error:
'struct rw_semaphore' has no member named 'owner'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.locking/core
head: 5c587ed687faed2eb0afdd669ddd167d0d940236
commit: 2d6f2f61367455179ee140b3d4af6974d3e5d06d [25/29] locking/rwsem: Enable time-based spinning on reader-owned rwsem
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 2d6f2f61367455179ee140b3d4af6974d3e5d06d
# 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:203: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:203:21: note: in expansion of macro 'READ_ONCE'
long owner = (long)READ_ONCE(sem->owner);
^~~~~~~~~
>> kernel/locking/rwsem.h:203: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:203:21: note: in expansion of macro 'READ_ONCE'
long owner = (long)READ_ONCE(sem->owner);
^~~~~~~~~
>> kernel/locking/rwsem.h:203: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:203:21: note: in expansion of macro 'READ_ONCE'
long owner = (long)READ_ONCE(sem->owner);
^~~~~~~~~
>> kernel/locking/rwsem.h:203: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:203:21: note: in expansion of macro 'READ_ONCE'
long owner = (long)READ_ONCE(sem->owner);
^~~~~~~~~
>> kernel/locking/rwsem.h:203: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:203: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:205:9: error: implicit declaration of function 'is_rwsem_owner_reader' [-Werror=implicit-function-declaration]
while (is_rwsem_owner_reader((struct task_struct *)owner)) {
^~~~~~~~~~~~~~~~~~~~~
>> kernel/locking/rwsem.h:206: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:208: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:208: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:208: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:208: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:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
kernel/locking/rwsem.h:208: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:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
kernel/locking/rwsem.h:208: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:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
kernel/locking/rwsem.h:208: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:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
kernel/locking/rwsem.h:208: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:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
kernel/locking/rwsem.h:208: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:208: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:208: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), \
^~~~~~~~~
kernel/locking/rwsem.h:208:11: note: in expansion of macro 'cmpxchg'
owner = cmpxchg((long *)&sem->owner, owner,
^~~~~~~
vim +203 kernel/locking/rwsem.h
196
197 /*
198 * Set the RWSEM_ANONYMOUSLY_OWNED flag if the RWSEM_READER_OWNED flag
199 * remains set. Otherwise, the operation will be aborted.
200 */
201 static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)
202 {
> 203 long owner = (long)READ_ONCE(sem->owner);
204
> 205 while (is_rwsem_owner_reader((struct task_struct *)owner)) {
> 206 if (!is_rwsem_owner_spinnable((struct task_struct *)owner))
207 break;
208 owner = cmpxchg((long *)&sem->owner, owner,
209 owner | RWSEM_ANONYMOUSLY_OWNED);
210 }
211 }
212
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (4614 bytes)
Powered by blists - more mailing lists