diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-27 15:01:37 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:39:06 -0400 |
commit | 1318a481fc37c503a901b96ae06b692ca2b21af5 (patch) | |
tree | 2b1bb8f52af5938759af38efdfa8a868b02d5804 /kernel/irq | |
parent | d895f51ebb54cefe367bda135fcf2cd734d51d03 (diff) |
genirq: Provide default irq init flags
Arch code sets it's own irq_desc.status flags right after boot and for
dynamically allocated interrupts. That might involve iterating over a
huge array.
Allow ARCH_IRQ_INIT_FLAGS to set separate flags aside of IRQ_DISABLED
which is the default.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 2 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 6 |
2 files changed, 4 insertions, 4 deletions
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), |