tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
linux-5.9.y-rt-rebase
head: 2e71df3c0898b1305428692e75f456de3bbb9140
commit: 3adf3b1805eb97b3ee7a49af496cfa7e44c8a90d [135/216] rtmutex: add ww_mutex addon for
mutex-rt
config: mips-randconfig-r025-20200921 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
4e8c028158b56d9c2142a62464e8e0686bde3584)
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
git checkout 3adf3b1805eb97b3ee7a49af496cfa7e44c8a90d
# 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 warnings (new ones prefixed by >>):
kernel/locking/rtmutex.c:69:20: warning: unused function
'clear_rt_mutex_waiters'
static inline void clear_rt_mutex_waiters(struct rt_mutex
^
> kernel/locking/rtmutex.c:1617:29: warning: unused function
'ww_mutex_lock_acquired'
static __always_inline void
ww_mutex_lock_acquired(struct ww_mutex
^
> kernel/locking/rtmutex.c:2551:1: warning: unused function
'ww_mutex_deadlock_injection'
ww_mutex_deadlock_injection(struct ww_mutex
struct ww_acquire_ctx
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set
push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data
__attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch")))
__if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h",
.line = 153, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept
1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $1, $2 # atomic_fetch_add
addu $0, $1, $3
sc $0, $2
beqz $0, 1b
.set pop
move $0, $1
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 12.0.0 (git://gitmirror/llvm_project
4e8c028158b56d9c2142a62464e8e0686bde3584)
Target: mips-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-4e8c028158/bin
clang-12: note: diagnostic msg:
Makefile arch include kernel scripts source usr
#
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.9.y-rt-rebase
git checkout 3adf3b1805eb97b3ee7a49af496cfa7e44c8a90d
vim +/ww_mutex_lock_acquired +1617 kernel/locking/rtmutex.c
1616
1617 static __always_inline void ww_mutex_lock_acquired(struct
ww_mutex *ww,
1618 struct ww_acquire_ctx *ww_ctx)
1619 {
1620 #ifdef CONFIG_DEBUG_MUTEXES
1621 /*
1622 * If this WARN_ON triggers, you used ww_mutex_lock to acquire,
1623 * but released with a normal mutex_unlock in this call.
1624 *
1625 * This should never happen, always use ww_mutex_unlock.
1626 */
1627 DEBUG_LOCKS_WARN_ON(ww->ctx);
1628
1629 /*
1630 * Not quite done after calling ww_acquire_done() ?
1631 */
1632 DEBUG_LOCKS_WARN_ON(ww_ctx->done_acquire);
1633
1634 if (ww_ctx->contending_lock) {
1635 /*
1636 * After -EDEADLK you tried to
1637 * acquire a different ww_mutex? Bad!
1638 */
1639 DEBUG_LOCKS_WARN_ON(ww_ctx->contending_lock != ww);
1640
1641 /*
1642 * You called ww_mutex_lock after receiving -EDEADLK,
1643 * but 'forgot' to unlock everything else first?
1644 */
1645 DEBUG_LOCKS_WARN_ON(ww_ctx->acquired > 0);
1646 ww_ctx->contending_lock = NULL;
1647 }
1648
1649 /*
1650 * Naughty, using a different class will lead to undefined behavior!
1651 */
1652 DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class);
1653 #endif
1654 ww_ctx->acquired++;
1655 }
1656
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org