From: guoren@kernel.org
To: palmerdabbelt@google.com, paul.walmsley@sifive.com,
anup@brainfault.org, greentime.hu@sifive.com, zong.li@sifive.com,
aou@eecs.berkeley.edu, tglx@linutronix.de, tycho@tycho.ws,
nickhu@andestech.com
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-csky@vger.kernel.org, Guo Ren <guoren@linux.alibaba.com>
Subject: [PATCH V2 2/3] riscv: Fixup lockdep_assert_held with wrong param cpu_running
Date: Sat, 27 Jun 2020 13:57:07 +0000 [thread overview]
Message-ID: <1593266228-61125-3-git-send-email-guoren@kernel.org> (raw)
In-Reply-To: <1593266228-61125-1-git-send-email-guoren@kernel.org>
From: Zong Li <zong.li@sifive.com>
The cpu_running is not a lock-class, it lacks the dep_map member in
completion. It causes the error as follow:
arch/riscv/kernel/smpboot.c: In function '__cpu_up':
./include/linux/lockdep.h:364:52: error: 'struct completion' has no member named 'dep_map'
364 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
| ^~
./include/asm-generic/bug.h:113:25: note: in definition of macro 'WARN_ON'
113 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
./include/linux/lockdep.h:390:27: note: in expansion of macro 'lockdep_is_held'
390 | WARN_ON(debug_locks && !lockdep_is_held(l)); \
| ^~~~~~~~~~~~~~~
arch/riscv/kernel/smpboot.c:118:2: note: in expansion of macro 'lockdep_assert_held'
118 | lockdep_assert_held(&cpu_running);
There are a lot of archs which use cpu_running in smpboot.c (arm,
arm64, openrisc, xtensa, s390, x86, mips), but none of them try
lockdep_assert_held(&cpu_running.wait.lock). So Just remove it.
Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
---
arch/riscv/kernel/smpboot.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 4e99227..defc4e1 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -121,7 +121,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
ret = start_secondary_cpu(cpu, tidle);
if (!ret) {
- lockdep_assert_held(&cpu_running);
wait_for_completion_timeout(&cpu_running,
msecs_to_jiffies(1000));
--
2.7.4
next prev parent reply other threads:[~2020-06-27 13:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-27 13:57 [PATCH V2 0/3] riscv: Enable LOCKDEP guoren
2020-06-27 13:57 ` [PATCH V2 1/3] riscv: Fixup static_obj() fail guoren
2020-09-11 20:45 ` Aurelien Jarno
2020-09-12 2:39 ` Guo Ren
2020-09-14 10:38 ` Aurelien Jarno
2020-09-24 7:36 ` Andreas Schwab
2020-09-24 16:19 ` Guo Ren
2020-09-29 18:51 ` Aurelien Jarno
2020-10-05 19:14 ` Atish Patra
2020-10-06 16:46 ` Guo Ren
2020-10-06 20:38 ` Atish Patra
2020-10-07 14:45 ` Guo Ren
2020-10-05 8:25 ` Andreas Schwab
2020-10-05 16:39 ` Palmer Dabbelt
2020-10-05 18:40 ` Andreas Schwab
2020-10-05 19:45 ` Palmer Dabbelt
2020-10-05 21:12 ` Atish Patra
2020-10-05 21:17 ` Palmer Dabbelt
2020-10-06 16:55 ` Guo Ren
2020-06-27 13:57 ` guoren [this message]
2020-09-29 22:12 ` [PATCH V2 2/3] riscv: Fixup lockdep_assert_held with wrong param cpu_running Atish Patra
2020-06-27 13:57 ` [PATCH V2 3/3] riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT guoren
2020-07-09 22:06 ` [PATCH V2 0/3] riscv: Enable LOCKDEP Palmer Dabbelt
2020-07-09 23:15 ` Guo Ren
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=1593266228-61125-3-git-send-email-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=greentime.hu@sifive.com \
--cc=guoren@linux.alibaba.com \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=nickhu@andestech.com \
--cc=palmerdabbelt@google.com \
--cc=paul.walmsley@sifive.com \
--cc=tglx@linutronix.de \
--cc=tycho@tycho.ws \
--cc=zong.li@sifive.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;
as well as URLs for NNTP newsgroup(s).