[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201904101833.EGX5tI6h%lkp@intel.com>
Date: Wed, 10 Apr 2019 18:47:36 +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]
arch/riscv/include/asm/cmpxchg.h:326:41: error: invalid type argument of
unary '*' (have 'int')
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-allyesconfig (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 >>):
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/percpu-rwsem.c:10:
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 kernel/locking/percpu-rwsem.c:1:
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,
^~~~~~~
cc1: some warnings being treated as errors
--
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/percpu-rwsem.c:10:
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 kernel//locking/percpu-rwsem.c:1:
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,
^~~~~~~
cc1: some warnings being treated as errors
vim +326 arch/riscv/include/asm/cmpxchg.h
5ce6c1f3 Andrea Parri 2018-03-09 309
5ce6c1f3 Andrea Parri 2018-03-09 310 #define __cmpxchg(ptr, old, new, size) \
5ce6c1f3 Andrea Parri 2018-03-09 311 ({ \
5ce6c1f3 Andrea Parri 2018-03-09 312 __typeof__(ptr) __ptr = (ptr); \
5ce6c1f3 Andrea Parri 2018-03-09 313 __typeof__(*(ptr)) __old = (old); \
5ce6c1f3 Andrea Parri 2018-03-09 314 __typeof__(*(ptr)) __new = (new); \
5ce6c1f3 Andrea Parri 2018-03-09 315 __typeof__(*(ptr)) __ret; \
5ce6c1f3 Andrea Parri 2018-03-09 316 register unsigned int __rc; \
5ce6c1f3 Andrea Parri 2018-03-09 @317 switch (size) { \
5ce6c1f3 Andrea Parri 2018-03-09 318 case 4: \
5ce6c1f3 Andrea Parri 2018-03-09 319 __asm__ __volatile__ ( \
5ce6c1f3 Andrea Parri 2018-03-09 320 "0: lr.w %0, %2\n" \
5ce6c1f3 Andrea Parri 2018-03-09 321 " bne %0, %z3, 1f\n" \
5ce6c1f3 Andrea Parri 2018-03-09 322 " sc.w.rl %1, %z4, %2\n" \
5ce6c1f3 Andrea Parri 2018-03-09 323 " bnez %1, 0b\n" \
5ce6c1f3 Andrea Parri 2018-03-09 324 " fence rw, rw\n" \
5ce6c1f3 Andrea Parri 2018-03-09 325 "1:\n" \
5ce6c1f3 Andrea Parri 2018-03-09 @326 : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
5ce6c1f3 Andrea Parri 2018-03-09 327 : "rJ" (__old), "rJ" (__new) \
5ce6c1f3 Andrea Parri 2018-03-09 328 : "memory"); \
5ce6c1f3 Andrea Parri 2018-03-09 329 break; \
5ce6c1f3 Andrea Parri 2018-03-09 330 case 8: \
5ce6c1f3 Andrea Parri 2018-03-09 331 __asm__ __volatile__ ( \
5ce6c1f3 Andrea Parri 2018-03-09 332 "0: lr.d %0, %2\n" \
5ce6c1f3 Andrea Parri 2018-03-09 333 " bne %0, %z3, 1f\n" \
5ce6c1f3 Andrea Parri 2018-03-09 334 " sc.d.rl %1, %z4, %2\n" \
5ce6c1f3 Andrea Parri 2018-03-09 335 " bnez %1, 0b\n" \
5ce6c1f3 Andrea Parri 2018-03-09 336 " fence rw, rw\n" \
5ce6c1f3 Andrea Parri 2018-03-09 337 "1:\n" \
fab957c1 Palmer Dabbelt 2017-07-10 338 : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
fab957c1 Palmer Dabbelt 2017-07-10 339 : "rJ" (__old), "rJ" (__new) \
fab957c1 Palmer Dabbelt 2017-07-10 340 : "memory"); \
fab957c1 Palmer Dabbelt 2017-07-10 341 break; \
fab957c1 Palmer Dabbelt 2017-07-10 342 default: \
fab957c1 Palmer Dabbelt 2017-07-10 343 BUILD_BUG(); \
fab957c1 Palmer Dabbelt 2017-07-10 344 } \
fab957c1 Palmer Dabbelt 2017-07-10 345 __ret; \
fab957c1 Palmer Dabbelt 2017-07-10 346 })
fab957c1 Palmer Dabbelt 2017-07-10 347
:::::: The code at line 326 was first introduced by commit
:::::: 5ce6c1f3535fa8d2134468547377b7b737042834 riscv/atomic: Strengthen implementations with fences
:::::: TO: Andrea Parri <parri.andrea@...il.com>
:::::: CC: Palmer Dabbelt <palmer@...ive.com>
---
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" (56225 bytes)
Powered by blists - more mailing lists