aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:14 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:50 -0400
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 60d60061659c..1b8cccb5ba25 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)
400 struct irq_cfg *cfg; \ 400 struct irq_cfg *cfg; \
401 struct irq_pin_list *entry; \ 401 struct irq_pin_list *entry; \
402 \ 402 \
403 BUG_ON(irq >= nr_irqs); \
404 cfg = irq_cfg(irq); \ 403 cfg = irq_cfg(irq); \
405 entry = cfg->irq_2_pin; \ 404 entry = cfg->irq_2_pin; \
406 for (;;) { \ 405 for (;;) { \
@@ -480,7 +479,6 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
480 struct irq_cfg *cfg; 479 struct irq_cfg *cfg;
481 struct irq_pin_list *entry; 480 struct irq_pin_list *entry;
482 481
483 BUG_ON(irq >= nr_irqs);
484 cfg = irq_cfg(irq); 482 cfg = irq_cfg(irq);
485 entry = cfg->irq_2_pin; 483 entry = cfg->irq_2_pin;
486 for (;;) { 484 for (;;) {
@@ -549,7 +547,6 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
549 struct irq_cfg *cfg; 547 struct irq_cfg *cfg;
550 struct irq_pin_list *entry; 548 struct irq_pin_list *entry;
551 549
552 BUG_ON(irq >= nr_irqs);
553 /* first time to refer irq_cfg, so with new */ 550 /* first time to refer irq_cfg, so with new */
554 cfg = irq_cfg_alloc(irq); 551 cfg = irq_cfg_alloc(irq);
555 entry = cfg->irq_2_pin; 552 entry = cfg->irq_2_pin;
@@ -841,7 +838,6 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
841 best_guess = irq; 838 best_guess = irq;
842 } 839 }
843 } 840 }
844 BUG_ON(best_guess >= nr_irqs);
845 return best_guess; 841 return best_guess;
846} 842}
847 843
@@ -973,7 +969,6 @@ static int pin_2_irq(int idx, int apic, int pin)
973 irq += nr_ioapic_registers[i++]; 969 irq += nr_ioapic_registers[i++];
974 irq += pin; 970 irq += pin;
975 } 971 }
976 BUG_ON(irq >= nr_irqs);
977 return irq; 972 return irq;
978} 973}
979 974
@@ -1008,7 +1003,6 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
1008 int cpu; 1003 int cpu;
1009 struct irq_cfg *cfg; 1004 struct irq_cfg *cfg;
1010 1005
1011 BUG_ON((unsigned)irq >= nr_irqs);
1012 cfg = irq_cfg(irq); 1006 cfg = irq_cfg(irq);
1013 1007
1014 /* Only try and allocate irqs on cpus that are present */ 1008 /* Only try and allocate irqs on cpus that are present */
@@ -1082,7 +1076,6 @@ static void __clear_irq_vector(int irq)
1082 cpumask_t mask; 1076 cpumask_t mask;
1083 int cpu, vector; 1077 int cpu, vector;
1084 1078
1085 BUG_ON((unsigned)irq >= nr_irqs);
1086 cfg = irq_cfg(irq); 1079 cfg = irq_cfg(irq);
1087 BUG_ON(!cfg->vector); 1080 BUG_ON(!cfg->vector);
1088 1081
@@ -1924,8 +1917,6 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
1924 struct irq_desc *desc; 1917 struct irq_desc *desc;
1925 struct irq_cfg *cfg; 1918 struct irq_cfg *cfg;
1926 irq = __get_cpu_var(vector_irq)[vector]; 1919 irq = __get_cpu_var(vector_irq)[vector];
1927 if (irq >= nr_irqs)
1928 continue;
1929 1920
1930 desc = irq_to_desc(irq); 1921 desc = irq_to_desc(irq);
1931 cfg = irq_cfg(irq); 1922 cfg = irq_cfg(irq);