Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490381
| From | Leo Li <pku.leo@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: recommended use of request_any_context_irq() |
| Date | 2016-09-23 20:40 +0200 |
| Message-ID | <skDy9-7oK-11@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sk7oB-3S7-9@gated-at.bofh.it> <skiWJ-2CY-7@gated-at.bofh.it> <skjg6-2JH-19@gated-at.bofh.it> <skkca-3ii-23@gated-at.bofh.it> <skklQ-3Bb-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 22, 2016 at 5:03 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> 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.
Thomas,
It is not ideal but definitely helpful to provide more information
when there is an issue.
>
> 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);
Can we provide more information in this message? It is still not
clear enough to people who are not familiar with threaded interrupt.
How about "IRQ%u is requesting standard interrupt while connected to
threaded interrupt controller\n Consider using
request_any_context_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;
> + }
> }
> }
>
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-21 23:20 +0200
Re: recommended use of request_any_context_irq() Marc Zyngier <marc.zyngier@arm.com> - 2016-09-22 10:20 +0200
Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-22 11:40 +0200
Re: recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-22 22:40 +0200
Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-22 23:00 +0200
Re: recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-23 00:00 +0200
Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-23 00:10 +0200
Re: recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-23 20:40 +0200
csiph-web