diff options
-rw-r--r-- | include/linux/irq.h | 6 | ||||
-rw-r--r-- | kernel/irq/chip.c | 2 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index bea40556c5a6..30a300991ed4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -214,6 +214,12 @@ struct irq_chip { | |||
214 | */ | 214 | */ |
215 | #include <asm/hw_irq.h> | 215 | #include <asm/hw_irq.h> |
216 | 216 | ||
217 | #ifndef ARCH_IRQ_INIT_FLAGS | ||
218 | # define ARCH_IRQ_INIT_FLAGS 0 | ||
219 | #endif | ||
220 | |||
221 | #define IRQ_DEFAULT_INIT_FLAGS (IRQ_DISABLED | ARCH_IRQ_INIT_FLAGS) | ||
222 | |||
217 | struct irqaction; | 223 | struct irqaction; |
218 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 224 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
219 | extern void remove_irq(unsigned int irq, struct irqaction *act); | 225 | extern void remove_irq(unsigned int irq, struct irqaction *act); |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 659be326c8e8..3405761d6224 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -31,7 +31,7 @@ static void dynamic_irq_init_x(unsigned int irq, bool keep_chip_data) | |||
31 | 31 | ||
32 | /* Ensure we don't have left over values from a previous use of this irq */ | 32 | /* Ensure we don't have left over values from a previous use of this irq */ |
33 | raw_spin_lock_irqsave(&desc->lock, flags); | 33 | raw_spin_lock_irqsave(&desc->lock, flags); |
34 | desc->status = IRQ_DISABLED; | 34 | desc->status = IRQ_DEFAULT_INIT_FLAGS; |
35 | desc->irq_data.chip = &no_irq_chip; | 35 | desc->irq_data.chip = &no_irq_chip; |
36 | desc->handle_irq = handle_bad_irq; | 36 | desc->handle_irq = handle_bad_irq; |
37 | desc->depth = 1; | 37 | desc->depth = 1; |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 78ff426a6cb7..29963f99f24d 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -39,7 +39,7 @@ EXPORT_SYMBOL_GPL(nr_irqs); | |||
39 | #ifdef CONFIG_SPARSE_IRQ | 39 | #ifdef CONFIG_SPARSE_IRQ |
40 | 40 | ||
41 | static struct irq_desc irq_desc_init = { | 41 | static struct irq_desc irq_desc_init = { |
42 | .status = IRQ_DISABLED, | 42 | .status = IRQ_DEFAULT_INIT_FLAGS, |
43 | .handle_irq = handle_bad_irq, | 43 | .handle_irq = handle_bad_irq, |
44 | .depth = 1, | 44 | .depth = 1, |
45 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock), | 45 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock), |
@@ -113,7 +113,7 @@ void replace_irq_desc(unsigned int irq, struct irq_desc *desc) | |||
113 | 113 | ||
114 | static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_smp = { | 114 | static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_smp = { |
115 | [0 ... NR_IRQS_LEGACY-1] = { | 115 | [0 ... NR_IRQS_LEGACY-1] = { |
116 | .status = IRQ_DISABLED, | 116 | .status = IRQ_DEFAULT_INIT_FLAGS, |
117 | .handle_irq = handle_bad_irq, | 117 | .handle_irq = handle_bad_irq, |
118 | .depth = 1, | 118 | .depth = 1, |
119 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock), | 119 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock), |
@@ -204,7 +204,7 @@ out_unlock: | |||
204 | 204 | ||
205 | struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { | 205 | struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { |
206 | [0 ... NR_IRQS-1] = { | 206 | [0 ... NR_IRQS-1] = { |
207 | .status = IRQ_DISABLED, | 207 | .status = IRQ_DEFAULT_INIT_FLAGS, |
208 | .handle_irq = handle_bad_irq, | 208 | .handle_irq = handle_bad_irq, |
209 | .depth = 1, | 209 | .depth = 1, |
210 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock), | 210 | .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock), |