From: Will Deacon <will.deacon@arm.com>
To: linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>
Subject: [PATCH 1/2] alpha: irq: run all handlers with interrupts disabled
Date: Sun, 17 Mar 2013 21:49:55 +0000 [thread overview]
Message-ID: <1363556996-21180-1-git-send-email-will.deacon@arm.com> (raw)
Linux has expected that interrupt handlers are executed with local
interrupts disabled for a while now, so ensure that this is the case on
Alpha even for non-device interrupts such as IPIs.
Without this patch, secondary boot results in the following backtrace:
------------[ cut here ]------------
warning: at kernel/softirq.c:139 __local_bh_enable+0xb8/0xd0()
modules linked in:
fffffc0000867c70 fffffc0000876618 fffffc0000330628 0000000000000200
fffffc000088e1b0 fffffc0000868000 0000000000000000 0000000000000000
fffffc0000331594 fffffc00008c79a0 fffffc000085fac0 0000000000000001
fffffc00003597e0 0000000000000008 fffffc000031b3b4 0000000000000001
0000000000000001 0000000000000000 fffffc0000315c4c fffffc00008b88f8
fffffc0000856e20 fffffc0000856b00 fffffc0001a060c0 0000000000000007
trace:
[<fffffc0000330628>] __local_bh_enable+0xb8/0xd0
[<fffffc0000331594>] irq_enter+0x74/0xa0
[<fffffc00003597e0>] scheduler_ipi+0x50/0x100
[<fffffc000031b3b4>] handle_ipi+0x84/0x260
[<fffffc0000315c4c>] do_entint+0x1ac/0x2e0
[<fffffc0000331620>] irq_exit+0x60/0xa0
[<fffffc00003159e8>] handle_irq+0x98/0x100
[<fffffc0000315d68>] do_entint+0x2c8/0x2e0
[<fffffc0000310d80>] ret_from_sys_call+0x0/0x10
[<fffffc0000365124>] load_balance+0x3e4/0x870
[<fffffc0000312bd4>] cpu_idle+0x24/0x80
[<fffffc0000391bd0>] rcu_eqs_enter_common.isra.38+0x0/0x120
[<fffffc0000312bf0>] cpu_idle+0x40/0x80
[<fffffc0000715030>] rest_init+0xc0/0xe0
[<fffffc000031001c>] _stext+0x1c/0x20
---[ end trace 5bbac1dc3a0ec32e ]---
A similar dump occurs if you try to reboot using magic-sysrq.
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/alpha/kernel/irq.c | 7 -------
arch/alpha/kernel/irq_alpha.c | 9 ++++++++-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 2872acc..7b2be25 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -117,13 +117,6 @@ handle_irq(int irq)
return;
}
- /*
- * From here we must proceed with IPL_MAX. Note that we do not
- * explicitly enable interrupts afterwards - some MILO PALcode
- * (namely LX164 one) seems to have severe problems with RTI
- * at IPL 0.
- */
- local_irq_disable();
irq_enter();
generic_handle_irq_desc(irq, desc);
irq_exit();
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index 772ddfdb..1216dfb 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -45,6 +45,14 @@ do_entInt(unsigned long type, unsigned long vector,
unsigned long la_ptr, struct pt_regs *regs)
{
struct pt_regs *old_regs;
+
+ /*
+ * Disable interrupts during IRQ handling.
+ * Note that there is no matching local_irq_enable() due to
+ * severe problems with RTI at IPL0 and some MILO PALcode
+ * (namely LX164).
+ */
+ local_irq_disable();
switch (type) {
case 0:
#ifdef CONFIG_SMP
@@ -62,7 +70,6 @@ do_entInt(unsigned long type, unsigned long vector,
{
long cpu;
- local_irq_disable();
smp_percpu_timer_interrupt(regs);
cpu = smp_processor_id();
if (cpu != boot_cpuid) {
--
1.8.0
next reply other threads:[~2013-03-17 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 21:49 Will Deacon [this message]
2013-03-17 21:49 ` [PATCH 2/2] alpha: irq: remove deprecated use of IRQF_DISABLED Will Deacon
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=1363556996-21180-1-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
/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
all inboxes | Powered by JetHome®