1 From 772aebcefeff310f80e32b874988af0076cb799d Mon Sep 17 00:00:00 2001
2 From: Mojiong Qiu <qiumojiong@gmail.com>
3 Date: Tue, 6 Nov 2012 16:08:15 +0800
4 Subject: xen/events: fix RCU warning, or Call idle notifier after irq_enter()
6 From: Mojiong Qiu <qiumojiong@gmail.com>
8 commit 772aebcefeff310f80e32b874988af0076cb799d upstream.
10 exit_idle() should be called after irq_enter(), otherwise it throws:
12 [ INFO: suspicious RCU usage. ]
14 -------------------------------
15 include/linux/rcupdate.h:725 rcu_read_lock() used illegally while idle!
17 other info that might help us debug this:
19 RCU used illegally from idle CPU!
20 rcu_scheduler_active = 1, debug_locks = 1
21 RCU used illegally from extended quiescent state!
22 1 lock held by swapper/0/0:
23 #0: (rcu_read_lock){......}, at: [<ffffffff810e9fe0>] __atomic_notifier_call_chain+0x0/0x140
26 Pid: 0, comm: swapper/0 Not tainted 3.6.5 #1
28 <IRQ> [<ffffffff811259a2>] lockdep_rcu_suspicious+0xe2/0x130
29 [<ffffffff810ea10c>] __atomic_notifier_call_chain+0x12c/0x140
30 [<ffffffff810e9fe0>] ? atomic_notifier_chain_unregister+0x90/0x90
31 [<ffffffff811216cd>] ? trace_hardirqs_off+0xd/0x10
32 [<ffffffff810ea136>] atomic_notifier_call_chain+0x16/0x20
33 [<ffffffff810777c3>] exit_idle+0x43/0x50
34 [<ffffffff81568865>] xen_evtchn_do_upcall+0x25/0x50
35 [<ffffffff81aa690e>] xen_do_hypervisor_callback+0x1e/0x30
36 <EOI> [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000
37 [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000
38 [<ffffffff81061540>] ? xen_safe_halt+0x10/0x20
39 [<ffffffff81075cfa>] ? default_idle+0xba/0x570
40 [<ffffffff810778af>] ? cpu_idle+0xdf/0x140
41 [<ffffffff81a4d881>] ? rest_init+0x135/0x144
42 [<ffffffff81a4d74c>] ? csum_partial_copy_generic+0x16c/0x16c
43 [<ffffffff82520c45>] ? start_kernel+0x3db/0x3e8
44 [<ffffffff8252066a>] ? repair_env_string+0x5a/0x5a
45 [<ffffffff82520356>] ? x86_64_start_reservations+0x131/0x135
46 [<ffffffff82524aca>] ? xen_start_kernel+0x465/0x46
48 Git commit 98ad1cc14a5c4fd658f9d72c6ba5c86dfd3ce0d5
49 Author: Frederic Weisbecker <fweisbec@gmail.com>
50 Date: Fri Oct 7 18:22:09 2011 +0200
52 x86: Call idle notifier after irq_enter()
54 did this, but it missed the Xen code.
56 Signed-off-by: Mojiong Qiu <mjqiu@tencent.com>
57 Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
58 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
61 drivers/xen/events.c | 2 +-
62 1 file changed, 1 insertion(+), 1 deletion(-)
64 --- a/drivers/xen/events.c
65 +++ b/drivers/xen/events.c
66 @@ -1374,8 +1374,8 @@ void xen_evtchn_do_upcall(struct pt_regs
68 struct pt_regs *old_regs = set_irq_regs(regs);
74 __xen_evtchn_do_upcall();