aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/settings.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-09 08:44:17 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:21 -0500
commit1ccb4e612f68ceefb888c2c6c1def6294ea8666d (patch)
treef3cae56489a56ebc54e06871abdf63193dc5a4bb /kernel/irq/settings.h
parent876dbd4cc1b35c1a4cb96a2be1d43ea0eabce3b4 (diff)
genirq: Wrap the remaning IRQ_* flags
Use wrappers to keep them away from the core code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/settings.h')
-rw-r--r--kernel/irq/settings.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h
index 2201f2aaa9a0..216b6f200e7c 100644
--- a/kernel/irq/settings.h
+++ b/kernel/irq/settings.h
@@ -6,7 +6,12 @@ enum {
6 _IRQ_DEFAULT_INIT_FLAGS = IRQ_DEFAULT_INIT_FLAGS, 6 _IRQ_DEFAULT_INIT_FLAGS = IRQ_DEFAULT_INIT_FLAGS,
7 _IRQ_PER_CPU = IRQ_PER_CPU, 7 _IRQ_PER_CPU = IRQ_PER_CPU,
8 _IRQ_LEVEL = IRQ_LEVEL, 8 _IRQ_LEVEL = IRQ_LEVEL,
9 _IRQ_NOPROBE = IRQ_NOPROBE,
10 _IRQ_NOREQUEST = IRQ_NOREQUEST,
11 _IRQ_NOAUTOEN = IRQ_NOAUTOEN,
12 _IRQ_MOVE_PCNTXT = IRQ_MOVE_PCNTXT,
9 _IRQ_NO_BALANCING = IRQ_NO_BALANCING, 13 _IRQ_NO_BALANCING = IRQ_NO_BALANCING,
14 _IRQ_NESTED_THREAD = IRQ_NESTED_THREAD,
10 _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK, 15 _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK,
11}; 16};
12 17
@@ -34,6 +39,14 @@ enum {
34#define IRQ_AFFINITY_SET GOT_YOU_MORON 39#define IRQ_AFFINITY_SET GOT_YOU_MORON
35#undef IRQ_LEVEL 40#undef IRQ_LEVEL
36#define IRQ_LEVEL GOT_YOU_MORON 41#define IRQ_LEVEL GOT_YOU_MORON
42#undef IRQ_NOPROBE
43#define IRQ_NOPROBE GOT_YOU_MORON
44#undef IRQ_NOREQUEST
45#define IRQ_NOREQUEST GOT_YOU_MORON
46#undef IRQ_NOAUTOEN
47#define IRQ_NOAUTOEN GOT_YOU_MORON
48#undef IRQ_NESTED_THREAD
49#define IRQ_NESTED_THREAD GOT_YOU_MORON
37#undef IRQF_MODIFY_MASK 50#undef IRQF_MODIFY_MASK
38#define IRQF_MODIFY_MASK GOT_YOU_MORON 51#define IRQF_MODIFY_MASK GOT_YOU_MORON
39 52
@@ -90,3 +103,48 @@ static inline void irq_settings_set_level(struct irq_desc *desc)
90{ 103{
91 desc->status |= _IRQ_LEVEL; 104 desc->status |= _IRQ_LEVEL;
92} 105}
106
107static inline bool irq_settings_can_request(struct irq_desc *desc)
108{
109 return !(desc->status & _IRQ_NOREQUEST);
110}
111
112static inline void irq_settings_clr_norequest(struct irq_desc *desc)
113{
114 desc->status &= ~_IRQ_NOREQUEST;
115}
116
117static inline void irq_settings_set_norequest(struct irq_desc *desc)
118{
119 desc->status |= _IRQ_NOREQUEST;
120}
121
122static inline bool irq_settings_can_probe(struct irq_desc *desc)
123{
124 return !(desc->status & _IRQ_NOPROBE);
125}
126
127static inline void irq_settings_clr_noprobe(struct irq_desc *desc)
128{
129 desc->status &= ~_IRQ_NOPROBE;
130}
131
132static inline void irq_settings_set_noprobe(struct irq_desc *desc)
133{
134 desc->status |= _IRQ_NOPROBE;
135}
136
137static inline bool irq_settings_can_move_pcntxt(struct irq_desc *desc)
138{
139 return desc->status & _IRQ_MOVE_PCNTXT;
140}
141
142static inline bool irq_settings_can_autoenable(struct irq_desc *desc)
143{
144 return !(desc->status & _IRQ_NOAUTOEN);
145}
146
147static inline bool irq_settings_is_nested_thread(struct irq_desc *desc)
148{
149 return desc->status & _IRQ_NESTED_THREAD;
150}