aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-09-28 04:40:18 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-12 10:39:05 -0400
commit442471848f5abb55b99cba1229301655f67492b4 (patch)
tree4265a98a62db515d2b0a63d95a7c7e5badb1dbc0 /include
parent3a3856d00c74560a7b8d9f8a13c1ca94ee786b78 (diff)
genirq: Provide status modifier
Provide a irq_desc.status modifier function to cleanup the direct access to irq_desc in arch and driver code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irq.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 80fdab208c13..e7e7ac83edd8 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -72,6 +72,10 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
72#define IRQ_ONESHOT 0x08000000 /* IRQ is not unmasked after hardirq */ 72#define IRQ_ONESHOT 0x08000000 /* IRQ is not unmasked after hardirq */
73#define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */ 73#define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */
74 74
75#define IRQF_MODIFY_MASK \
76 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
77 IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL)
78
75#ifdef CONFIG_IRQ_PER_CPU 79#ifdef CONFIG_IRQ_PER_CPU
76# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 80# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
77# define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) 81# define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING)
@@ -289,8 +293,27 @@ set_irq_chained_handler(unsigned int irq,
289 293
290extern void set_irq_nested_thread(unsigned int irq, int nest); 294extern void set_irq_nested_thread(unsigned int irq, int nest);
291 295
292extern void set_irq_noprobe(unsigned int irq); 296void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set);
293extern void set_irq_probe(unsigned int irq); 297
298static inline void irq_set_status_flags(unsigned int irq, unsigned long set)
299{
300 irq_modify_status(irq, 0, set);
301}
302
303static inline void irq_clear_status_flags(unsigned int irq, unsigned long clr)
304{
305 irq_modify_status(irq, clr, 0);
306}
307
308static inline void set_irq_noprobe(unsigned int irq)
309{
310 irq_modify_status(irq, 0, IRQ_NOPROBE);
311}
312
313static inline void set_irq_probe(unsigned int irq)
314{
315 irq_modify_status(irq, IRQ_NOPROBE, 0);
316}
294 317
295/* Handle dynamic irq creation and destruction */ 318/* Handle dynamic irq creation and destruction */
296extern unsigned int create_irq_nr(unsigned int irq_want, int node); 319extern unsigned int create_irq_nr(unsigned int irq_want, int node);