mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
genirq: Support per-IRQ thread disabling.
This adds support for disabling threading on a per-IRQ basis via the IRQ status instead of the IRQ flow, which is necessary for interrupts that don't follow the natural IRQ flow channels, such as those that are virtually created. The new APIs added are simply: irq_set_thread() irq_set_nothread() which follow the rest of the IRQ status routines. Chained handlers also have IRQ_NOTHREAD set on them automatically, making the lack of threading explicit rather than implicit. Subsequently, the nothread flag can be viewed through the standard genirq debugging facilities. [ tglx: Fixed cleanup fallout ] Signed-off-by: Paul Mundt <lethal@linux-sh.org> Link: http://lkml.kernel.org/r/%3C20110406210135.GF18426%40linux-sh.org%3E Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
770767787c
commit
7f1b1244e1
5 changed files with 34 additions and 2 deletions
|
@ -59,6 +59,7 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data);
|
|||
* IRQ_NOPROBE - Interrupt cannot be probed by autoprobing
|
||||
* IRQ_NOREQUEST - Interrupt cannot be requested via
|
||||
* request_irq()
|
||||
* IRQ_NOTHREAD - Interrupt cannot be threaded
|
||||
* IRQ_NOAUTOEN - Interrupt is not automatically enabled in
|
||||
* request/setup_irq()
|
||||
* IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set)
|
||||
|
@ -85,6 +86,7 @@ enum {
|
|||
IRQ_NO_BALANCING = (1 << 13),
|
||||
IRQ_MOVE_PCNTXT = (1 << 14),
|
||||
IRQ_NESTED_THREAD = (1 << 15),
|
||||
IRQ_NOTHREAD = (1 << 16),
|
||||
};
|
||||
|
||||
#define IRQF_MODIFY_MASK \
|
||||
|
@ -422,7 +424,7 @@ irq_set_handler(unsigned int irq, irq_flow_handler_t handle)
|
|||
/*
|
||||
* Set a highlevel chained flow handler for a given IRQ.
|
||||
* (a chained handler is automatically enabled and set to
|
||||
* IRQ_NOREQUEST and IRQ_NOPROBE)
|
||||
* IRQ_NOREQUEST, IRQ_NOPROBE, and IRQ_NOTHREAD)
|
||||
*/
|
||||
static inline void
|
||||
irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle)
|
||||
|
@ -452,6 +454,16 @@ static inline void irq_set_probe(unsigned int irq)
|
|||
irq_modify_status(irq, IRQ_NOPROBE, 0);
|
||||
}
|
||||
|
||||
static inline void irq_set_nothread(unsigned int irq)
|
||||
{
|
||||
irq_modify_status(irq, 0, IRQ_NOTHREAD);
|
||||
}
|
||||
|
||||
static inline void irq_set_thread(unsigned int irq)
|
||||
{
|
||||
irq_modify_status(irq, IRQ_NOTHREAD, 0);
|
||||
}
|
||||
|
||||
static inline void irq_set_nested_thread(unsigned int irq, bool nest)
|
||||
{
|
||||
if (nest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue