From: Thomas Gleixner <tglx@linutronix.de>
To: Leo Li <pku.leo@gmail.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
Marc Zyngier <maz@misterjones.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: recommended use of request_any_context_irq()
Date: Fri, 23 Sep 2016 00:03:36 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1609222359510.5640@nanos> (raw)
In-Reply-To: <CADRPPNSzR6TN7PaROc2iW9jKdq8B5OtoFxV+forWpbx9f4J_sw@mail.gmail.com>
Leo,
On Thu, 22 Sep 2016, Leo Li wrote:
> core code. And my concerns is that there are other drivers can hit
> the same problem if connected to the threaded interrupt controller.
> What can we do prevent similar problem in the future?
The simplest way is to be more informative in the failure case. See patch
below.
Converting drivers is surely something which can be done, but I wouldn't
try to do a wholesale conversion blindly.
Thanks,
tglx
8<----------------
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 73a2b786b5e9..605915f689b4 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1146,6 +1146,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
nested = irq_settings_is_nested_thread(desc);
if (nested) {
if (!new->thread_fn) {
+ pr_warn("IRQ%u is nested, but thread_fn is NULL\n", irq);
ret = -EINVAL;
goto out_mput;
}
@@ -1158,8 +1159,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
} else {
if (irq_settings_can_thread(desc)) {
ret = irq_setup_forced_threading(new);
- if (ret)
+ if (ret) {
+ pr_warn("IRQ%u failed to setup thread\n", irq);
goto out_mput;
+ }
}
}
next prev parent reply other threads:[~2016-09-22 22:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 21:14 Leo Li
2016-09-22 8:10 ` Marc Zyngier
2016-09-22 9:29 ` Thomas Gleixner
2016-09-22 20:38 ` Leo Li
2016-09-22 20:47 ` Thomas Gleixner
2016-09-22 21:52 ` Leo Li
2016-09-22 22:03 ` Thomas Gleixner [this message]
2016-09-23 18:33 ` Leo 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=alpine.DEB.2.20.1609222359510.5640@nanos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=maz@misterjones.org \
--cc=pku.leo@gmail.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
all inboxes | Powered by JetHome®