Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136379
b: refs/heads/master
c: 9594949
h: refs/heads/master
i:
  136377: db72540
  136375: ec20bc3
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jan 11, 2009
1 parent 13b55dd commit cc11ea8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7a3589e7a1f8fdbd2536fe1bfa60b37f5121c69
refs/heads/master: 9594949b060efe86ecaa1a66839232a3b9800bc9
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ unsigned int create_irq_nr(unsigned int irq_want)

irq = 0;
spin_lock_irqsave(&vector_lock, flags);
for (new = irq_want; new < NR_IRQS; new++) {
for (new = irq_want; new < nr_irqs; new++) {
if (platform_legacy_irq(new))
continue;

Expand Down
14 changes: 9 additions & 5 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -143,15 +145,15 @@ 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();
}

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)
Expand All @@ -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;
}
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit cc11ea8

Please sign in to comment.