From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@ozlabs.org, Daniel Walker <dwalker@mvista.com>,
Timur Tabi <timur@freescale.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH -rt] powerpc/qeic: fix sleeping in atomic context
Date: Tue, 26 Aug 2008 21:58:55 +0400 [thread overview]
Message-ID: <20080826175855.GA9853@oksana.dev.rtsoft.ru> (raw)
Cascade interrupts do not use threads, thus handlers are called
with interrupts disabled. This means that we must not grab regular
spinlocks, since they might sleep:
BUG: sleeping function called from invalid context swapper(0) at kernel/rtmutex.c:743
in_atomic():1 [00010002], irqs_disabled():1
Call Trace:
[c0353e00] [c0008a04] show_stack+0x4c/0x1ac (unreliable)
[c0353e40] [c001ca18] __might_sleep+0xc0/0x108
[c0353e50] [c0254218] __rt_spin_lock+0x30/0xa0
[c0353e60] [c0018238] qe_ic_mask_irq+0x58/0xc4
[c0353e80] [c0057bc8] handle_level_irq+0x40/0x178
[c0353ea0] [c001a5c0] qe_ic_cascade_low_ipic+0x50/0x68
[c0353eb0] [c00066d0] do_IRQ+0x9c/0xc0
[c0353ec0] [c001167c] ret_from_except+0x0/0x14
--- Exception: 501 at cpu_idle+0xa0/0x104
LR = cpu_idle+0xa0/0x104
[c0353f80] [c0009b5c] cpu_idle+0x50/0x104 (unreliable)
[c0353fa0] [c0256088] _etext+0x88/0x9c
[c0353fc0] [c0304af8] start_kernel+0x1c4/0x244
[c0353ff0] [00003438] 0x3438
To fix the issue we should use raw spin lock.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
Note, the patch is for -rt tree only.
arch/powerpc/sysdev/qe_lib/qe_ic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index f59444d..a30169c 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -33,7 +33,7 @@
#include "qe_ic.h"
-static DEFINE_SPINLOCK(qe_ic_lock);
+static DEFINE_RAW_SPINLOCK(qe_ic_lock);
static struct qe_ic_info qe_ic_info[] = {
[1] = {
--
1.5.6.3
reply other threads:[~2008-08-26 17:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080826175855.GA9853@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=timur@freescale.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).