aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/io_apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 20:50:14 -0700
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:52:50 +0200
commit7d94f7ca401dd7f445fda9a971a48aa5427b3e55 (patch)
tree8f4d4b73966fd0aa54df2da5bbcf67ea0a7ff43a /arch/x86/kernel/io_apic_64.c
parent46b8214d12c274bd4265aae482ab7ffe69d94818 (diff)
irq: remove >= nr_irqs checking with config_have_sparse_irq
remove irq limit checks - nr_irqs is dynamic and we expand anytime. v2: fix checking about result irq_cfg_without_new, so could use msi again v3: use irq_desc_without_new to check irq is valid Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r--arch/x86/kernel/io_apic_64.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 60d60061659..1b8cccb5ba2 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -400,7 +400,6 @@ static inline void io_apic_sync(unsigned int apic)
struct irq_cfg *cfg; \
struct irq_pin_list *entry; \
\
- BUG_ON(irq >= nr_irqs); \
cfg = irq_cfg(irq); \
entry = cfg->irq_2_pin; \
for (;;) { \
@@ -480,7 +479,6 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
struct irq_cfg *cfg;
struct irq_pin_list *entry;
- BUG_ON(irq >= nr_irqs);
cfg = irq_cfg(irq);
entry = cfg->irq_2_pin;
for (;;) {
@@ -549,7 +547,6 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
struct irq_cfg *cfg;
struct irq_pin_list *entry;
- BUG_ON(irq >= nr_irqs);
/* first time to refer irq_cfg, so with new */
cfg = irq_cfg_alloc(irq);
entry = cfg->irq_2_pin;
@@ -841,7 +838,6 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
best_guess = irq;
}
}
- BUG_ON(best_guess >= nr_irqs);
return best_guess;
}
@@ -973,7 +969,6 @@ static int pin_2_irq(int idx, int apic, int pin)
irq += nr_ioapic_registers[i++];
irq += pin;
}
- BUG_ON(irq >= nr_irqs);
return irq;
}
@@ -1008,7 +1003,6 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
int cpu;
struct irq_cfg *cfg;
- BUG_ON((unsigned)irq >= nr_irqs);
cfg = irq_cfg(irq);
/* Only try and allocate irqs on cpus that are present */
@@ -1082,7 +1076,6 @@ static void __clear_irq_vector(int irq)
cpumask_t mask;
int cpu, vector;
- BUG_ON((unsigned)irq >= nr_irqs);
cfg = irq_cfg(irq);
BUG_ON(!cfg->vector);
@@ -1924,8 +1917,6 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
struct irq_desc *desc;
struct irq_cfg *cfg;
irq = __get_cpu_var(vector_irq)[vector];
- if (irq >= nr_irqs)
- continue;
desc = irq_to_desc(irq);
cfg = irq_cfg(irq);