[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa686aa41003191048s5c4c85ablc4588725a3d615ad@mail.gmail.com>
Date: Fri, 19 Mar 2010 11:48:34 -0600
From: Grant Likely <grant.likely@...retlab.ca>
To: Christian Pellegrin <chripell@...e.org>
Cc: feng.tang@...el.com, akpm@...ux-foundation.org, greg@...ah.com,
david-b@...bell.net, alan@...rguk.ukuu.org.uk,
spi-devel-general@...ts.sourceforge.net,
linux-serial@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] max3100: added raise_threaded_irq
On Fri, Mar 19, 2010 at 2:38 AM, Christian Pellegrin <chripell@...e.org> wrote:
> raise_threaded_irq schedules the execution of an interrupt thread
>
> Signed-off-by: Christian Pellegrin <chripell@...e.org>
You should cc: Thomas and Ingo and lkml (which I just did) on patches
to the threaded interrupt code.
g.
> ---
> include/linux/interrupt.h | 3 +++
> kernel/irq/manage.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 30 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 75f3f00..14c0c13 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -144,6 +144,9 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler,
> static inline void exit_irq_thread(void) { }
> #endif
>
> +extern int raise_threaded_irq(unsigned int irq);
> +
> +
> extern void free_irq(unsigned int, void *);
>
> struct device;
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index eb6078c..a7d21e0 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -1088,3 +1088,30 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
> return retval;
> }
> EXPORT_SYMBOL(request_threaded_irq);
> +
> +/**
> + * raise_threaded_irq - triggers a threded interrupt
> + * @irq: Interrupt line to trigger
> + */
> +int raise_threaded_irq(unsigned int irq)
> +{
> + struct irq_desc *desc = irq_to_desc(irq);
> + struct irqaction *action;
> +
> + if (!desc)
> + return -ENOENT;
> + action = desc->action;
> + if (!action)
> + return -ENOENT;
> + if (unlikely(!action->thread_fn))
> + return -EINVAL;
> + if (likely(!test_bit(IRQTF_DIED,
> + &action->thread_flags))) {
> + set_bit(IRQTF_RUNTHREAD, &action->thread_flags);
> + wake_up_process(action->thread);
> + } else {
> + return -ECHILD;
> + }
> + return 0;
> +}
> +EXPORT_SYMBOL(raise_threaded_irq);
> --
> 1.5.6.5
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists