diff options
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 27a67536511e..974890b3c52f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -17,9 +17,11 @@ | |||
17 | #include <linux/cache.h> | 17 | #include <linux/cache.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <linux/irqreturn.h> | 21 | #include <linux/irqreturn.h> |
21 | #include <linux/irqnr.h> | 22 | #include <linux/irqnr.h> |
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/topology.h> | ||
23 | 25 | ||
24 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
25 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
@@ -65,6 +67,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
65 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | 67 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ |
66 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ | 68 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ |
67 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ | 69 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ |
70 | #define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */ | ||
68 | 71 | ||
69 | #ifdef CONFIG_IRQ_PER_CPU | 72 | #ifdef CONFIG_IRQ_PER_CPU |
70 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 73 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
@@ -160,12 +163,10 @@ struct irq_2_iommu; | |||
160 | */ | 163 | */ |
161 | struct irq_desc { | 164 | struct irq_desc { |
162 | unsigned int irq; | 165 | unsigned int irq; |
163 | #ifdef CONFIG_SPARSE_IRQ | ||
164 | struct timer_rand_state *timer_rand_state; | 166 | struct timer_rand_state *timer_rand_state; |
165 | unsigned int *kstat_irqs; | 167 | unsigned int *kstat_irqs; |
166 | # ifdef CONFIG_INTR_REMAP | 168 | #ifdef CONFIG_INTR_REMAP |
167 | struct irq_2_iommu *irq_2_iommu; | 169 | struct irq_2_iommu *irq_2_iommu; |
168 | # endif | ||
169 | #endif | 170 | #endif |
170 | irq_flow_handler_t handle_irq; | 171 | irq_flow_handler_t handle_irq; |
171 | struct irq_chip *chip; | 172 | struct irq_chip *chip; |
@@ -202,12 +203,6 @@ extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc | |||
202 | extern struct irq_desc irq_desc[NR_IRQS]; | 203 | extern struct irq_desc irq_desc[NR_IRQS]; |
203 | #else /* CONFIG_SPARSE_IRQ */ | 204 | #else /* CONFIG_SPARSE_IRQ */ |
204 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | 205 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); |
205 | |||
206 | #define kstat_irqs_this_cpu(DESC) \ | ||
207 | ((DESC)->kstat_irqs[smp_processor_id()]) | ||
208 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | ||
209 | ((DESC)->kstat_irqs[smp_processor_id()]++) | ||
210 | |||
211 | #endif /* CONFIG_SPARSE_IRQ */ | 206 | #endif /* CONFIG_SPARSE_IRQ */ |
212 | 207 | ||
213 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | 208 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); |
@@ -226,7 +221,6 @@ irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | |||
226 | * Migration helpers for obsolete names, they will go away: | 221 | * Migration helpers for obsolete names, they will go away: |
227 | */ | 222 | */ |
228 | #define hw_interrupt_type irq_chip | 223 | #define hw_interrupt_type irq_chip |
229 | typedef struct irq_chip hw_irq_controller; | ||
230 | #define no_irq_type no_irq_chip | 224 | #define no_irq_type no_irq_chip |
231 | typedef struct irq_desc irq_desc_t; | 225 | typedef struct irq_desc irq_desc_t; |
232 | 226 | ||
@@ -236,6 +230,7 @@ typedef struct irq_desc irq_desc_t; | |||
236 | #include <asm/hw_irq.h> | 230 | #include <asm/hw_irq.h> |
237 | 231 | ||
238 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 232 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
233 | extern void remove_irq(unsigned int irq, struct irqaction *act); | ||
239 | 234 | ||
240 | #ifdef CONFIG_GENERIC_HARDIRQS | 235 | #ifdef CONFIG_GENERIC_HARDIRQS |
241 | 236 | ||
@@ -280,7 +275,7 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
280 | } | 275 | } |
281 | 276 | ||
282 | /* Handle irq action chains: */ | 277 | /* Handle irq action chains: */ |
283 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 278 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); |
284 | 279 | ||
285 | /* | 280 | /* |
286 | * Built-in IRQ handlers for various IRQ types, | 281 | * Built-in IRQ handlers for various IRQ types, |
@@ -325,7 +320,7 @@ static inline void generic_handle_irq(unsigned int irq) | |||
325 | 320 | ||
326 | /* Handling of unhandled and spurious interrupts: */ | 321 | /* Handling of unhandled and spurious interrupts: */ |
327 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 322 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
328 | int action_ret); | 323 | irqreturn_t action_ret); |
329 | 324 | ||
330 | /* Resending of interrupts :*/ | 325 | /* Resending of interrupts :*/ |
331 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 326 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |