summaryrefslogtreecommitdiffstats
path: root/kernel/irq/handle.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2009-01-10 22:24:06 -0800
committerIngo Molnar <mingo@elte.hu>2009-01-11 19:13:29 +0100
commit9594949b060efe86ecaa1a66839232a3b9800bc9 (patch)
tree5d0a450fd271c23c838e22f5e6998d24f6921e3c /kernel/irq/handle.c
parentc7a3589e7a1f8fdbd2536fe1bfa60b37f5121c69 (diff)
downloadtalos-op-linux-9594949b060efe86ecaa1a66839232a3b9800bc9.tar.gz
talos-op-linux-9594949b060efe86ecaa1a66839232a3b9800bc9.zip
irq: change references from NR_IRQS to nr_irqs
Impact: preparation, cleanup, add KERN_INFO printk Modify references from NR_IRQS to nr_irqs as the later will become variable-sized based on nr_cpu_ids when CONFIG_SPARSE_IRQS=y. Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r--kernel/irq/handle.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index f01c0a30cb42..790c5fa7ea39 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -132,6 +132,8 @@ int __init early_irq_init(void)
int legacy_count;
int i;
+ printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs);
+
desc = irq_desc_legacy;
legacy_count = ARRAY_SIZE(irq_desc_legacy);
@@ -143,7 +145,7 @@ int __init early_irq_init(void)
irq_desc_ptrs[i] = desc + i;
}
- for (i = legacy_count; i < NR_IRQS; i++)
+ for (i = legacy_count; i < nr_irqs; i++)
irq_desc_ptrs[i] = NULL;
return arch_early_irq_init();
@@ -151,7 +153,7 @@ int __init early_irq_init(void)
struct irq_desc *irq_to_desc(unsigned int irq)
{
- return (irq < NR_IRQS) ? irq_desc_ptrs[irq] : NULL;
+ return (irq < nr_irqs) ? irq_desc_ptrs[irq] : NULL;
}
struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
@@ -160,9 +162,9 @@ struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
unsigned long flags;
int node;
- if (irq >= NR_IRQS) {
- printk(KERN_WARNING "irq >= NR_IRQS in irq_to_desc_alloc: %d %d\n",
- irq, NR_IRQS);
+ if (irq >= nr_irqs) {
+ printk(KERN_WARNING "irq >= nr_irqs in irq_to_desc_alloc: %d %d\n",
+ irq, nr_irqs);
WARN_ON(1);
return NULL;
}
@@ -214,6 +216,8 @@ int __init early_irq_init(void)
int count;
int i;
+ printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS);
+
desc = irq_desc;
count = ARRAY_SIZE(irq_desc);
OpenPOWER on IntegriCloud