mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Esben Haabendal <eha@doredevelopment.dk>
Cc: linux-kernel@vger.kernel.org, maz@misterjones.org, mingo@elte.hu,
	joachim.eastwood@jotron.com
Subject: Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-threaded interrupt handlers
Date: Fri, 4 Jun 2010 23:46:59 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1006042343150.2933@localhost.localdomain> (raw)
In-Reply-To: <1275686352.2970.2.camel@eha.doredevelopment.dk>

On Fri, 4 Jun 2010, Esben Haabendal wrote:

> set_irq_nested_thread() might be called by interrupt controller to
> supported nested irq thread handling, and with this change, drivers
> with non-threaded irq handlers can still use the irqs.

What's the problem you are trying to solve ? The above changelog is
not very useful ?

Thanks,

	tglx
 
> Signed-off-by: Esben Haabendal <eha@doredevelopment.dk>
> ---
>  kernel/irq/chip.c   |    9 ++++++++-
>  kernel/irq/manage.c |    4 +---
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index b7091d5..8202993 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -405,7 +405,14 @@ void handle_nested_irq(unsigned int irq)
>  	desc->status |= IRQ_INPROGRESS;
>  	raw_spin_unlock_irq(&desc->lock);
>  
> -	action_ret = action->thread_fn(action->irq, action->dev_id);
> +	if (desc->status & IRQ_NESTED_THREAD && action->thread_fn)
> +		action_ret = action->thread_fn(action->irq, action->dev_id);
> +	else {
> +		local_irq_disable();
> +		action_ret = action->handler(action->irq, action->dev_id);
> +		local_irq_enable();
> +	}
> +
>  	if (!noirqdebug)
>  		note_interrupt(irq, desc, action_ret);
>  
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 3164ba7..e7bca04 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -681,10 +681,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
>  	 * Check whether the interrupt nests into another interrupt
>  	 * thread.
>  	 */
> -	nested = desc->status & IRQ_NESTED_THREAD;
> +	nested = (desc->status & IRQ_NESTED_THREAD) && new->thread_fn;
>  	if (nested) {
> -		if (!new->thread_fn)
> -			return -EINVAL;
>  		/*
>  		 * Replace the primary handler which was provided from
>  		 * the driver for non nested interrupt handling by the
> -- 
> 1.7.1
> 
> 
> 

  reply	other threads:[~2010-06-04 21:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 21:19 Esben Haabendal
2010-06-04 21:46 ` Thomas Gleixner [this message]
2010-06-05 13:56   ` Esben Haabendal
2010-06-05 14:10     ` Marc Zyngier
2010-06-05 15:33       ` Thomas Gleixner
2010-06-05 17:01         ` Esben Haabendal
2010-06-05 18:52           ` Thomas Gleixner
2010-06-05 19:48             ` Esben Haabendal
2010-06-05 20:14               ` Thomas Gleixner
2010-06-06 19:50                 ` Esben Haabendal
2010-06-06 22:08                   ` Thomas Gleixner
2010-06-07 12:34                     ` Esben Haabendal
2010-06-07 15:06                       ` Thomas Gleixner
2010-06-07 21:28                         ` Esben Haabendal
2010-06-07 23:18                           ` Thomas Gleixner
2010-06-08 14:15                             ` Esben Haabendal
2010-06-08  6:58                           ` Thomas Gleixner
2010-06-08  7:23                             ` Esben Haabendal
2010-06-05 16:53       ` Esben Haabendal
2010-06-05 17:18         ` Marc Zyngier
2010-06-05 19:38           ` Esben Haabendal

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.LFD.2.00.1006042343150.2933@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=eha@doredevelopment.dk \
    --cc=joachim.eastwood@jotron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@misterjones.org \
    --cc=mingo@elte.hu \
    /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®