From: tip-bot for Wanpeng Li <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
kernellwp@gmail.com, tglx@linutronix.de, peterz@infradead.org,
wanpeng.li@hotmail.com, efault@gmx.de
Subject: [tip:x86/urgent] x86/smp: Add irq_enter/exit() in smp_reschedule_interrupt()
Date: Fri, 14 Oct 2016 05:19:32 -0700 [thread overview]
Message-ID: <tip-1ec6ec14a2943f6f611fc1d5fb2d4eaa85bd9d72@git.kernel.org> (raw)
In-Reply-To: <1476409733-5133-1-git-send-email-wanpeng.li@hotmail.com>
Commit-ID: 1ec6ec14a2943f6f611fc1d5fb2d4eaa85bd9d72
Gitweb: http://git.kernel.org/tip/1ec6ec14a2943f6f611fc1d5fb2d4eaa85bd9d72
Author: Wanpeng Li <kernellwp@gmail.com>
AuthorDate: Fri, 14 Oct 2016 09:48:53 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 14 Oct 2016 14:14:20 +0200
x86/smp: Add irq_enter/exit() in smp_reschedule_interrupt()
===============================
[ INFO: suspicious RCU usage. ]
4.8.0+ #24 Not tainted
-------------------------------
./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
no locks held by swapper/1/0.
[<ffffffff9d492b95>] do_trace_write_msr+0x135/0x140
[<ffffffff9d06f860>] native_write_msr+0x20/0x30
[<ffffffff9d065fad>] native_apic_msr_eoi_write+0x1d/0x30
[<ffffffff9d05bd1d>] smp_reschedule_interrupt+0x1d/0x30
[<ffffffff9d8daec6>] reschedule_interrupt+0x96/0xa0
Reschedule interrupt may be called in cpu idle state. This causes lockdep
check warning above.
Add irq_enter/exit() in smp_reschedule_interrupt(), irq_enter() tells the RCU
subsystems to end the extended quiescent state, so the following trace call in
ack_APIC_irq() works correctly.
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Link: http://lkml.kernel.org/r/1476409733-5133-1-git-send-email-wanpeng.li@hotmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/smp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 658777c..ac2ee87 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -259,8 +259,10 @@ static inline void __smp_reschedule_interrupt(void)
__visible void smp_reschedule_interrupt(struct pt_regs *regs)
{
+ irq_enter();
ack_APIC_irq();
__smp_reschedule_interrupt();
+ irq_exit();
/*
* KVM uses this interrupt to force a cpu out of guest mode
*/
next prev parent reply other threads:[~2016-10-14 12:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 1:48 [PATCH] " Wanpeng Li
2016-10-14 12:19 ` tip-bot for Wanpeng Li [this message]
2016-10-16 13:39 ` Peter Zijlstra
2016-10-17 4:19 ` Wanpeng Li
2016-10-17 8:22 ` Peter Zijlstra
2016-10-17 9:45 ` Wanpeng Li
2016-10-17 10:08 ` Paolo Bonzini
2016-10-17 10:23 ` Wanpeng Li
2016-10-18 0:01 ` Wanpeng Li
2016-10-19 14:01 ` Wanpeng Li
2016-10-19 14:10 ` Paolo Bonzini
2016-10-19 14:30 ` Wanpeng Li
2016-10-24 14:32 ` Paolo Bonzini
2016-10-25 2:52 ` Wanpeng Li
2016-10-17 12:19 ` Wanpeng Li
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=tip-1ec6ec14a2943f6f611fc1d5fb2d4eaa85bd9d72@git.kernel.org \
--to=tipbot@zytor.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=kernellwp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=wanpeng.li@hotmail.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
Powered by JetHome