x86, io_apic: Fix number of pre-allocated irqs
PATCH 1/1 x86, io_apic: Fix number of pre-allocated irqs
arch_probe_nr_irqs() has a typo when returning number of preallocated irqs. Instead of returning the calculated value, it returns a constant number NR_IRQ_LEGACY.
This patch makes sure the calculated value is returned intead.
--- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -3437,7 +3437,7 @@ int __init arch_probe_nr_irqs(void)if (nr < nr_irqs) nr_irqs = nr; -return NR_IRQS_LEGACY ; +return nr; } int io_apic_set_pci_routing(struct device *dev, int irq,
Signature · 1 line
1.7.10.4
tip-bot for David Cohen
merge bot[tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
irq/x86/io_apic: Fix number of pre-allocated irqs
Commit-ID: 8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Gitweb: http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Author: David Cohen <[email protected]> AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 May 2013 12:01:29 +0200
irq/x86/io_apic: Fix number of pre-allocated irqs
arch_probe_nr_irqs() has a typo when returning number of preallocated irqs. Instead of returning the calculated value, it returns a constant number NR_IRQ_LEGACY.
This patch makes sure the calculated value is returned intead.
--- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -3437,7 +3437,7 @@ int __init arch_probe_nr_irqs(void)if (nr < nr_irqs) nr_irqs = nr; -return NR_IRQS_LEGACY ; +return nr; } int io_apic_set_pci_routing(struct device *dev, int irq,
Re: [tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
Quoted 7 lines · tip-bot for David Cohen
Commit-ID: 8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Gitweb: http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Author: David Cohen <[email protected]> AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 May 2013 12:01:29 +0200
Quoted 5 lines
irq/x86/io_apic: Fix number of pre-allocated irqs
arch_probe_nr_irqs()has a typo when returning number of preallocated irqs. Instead of returning the calculated value, it returns a constant numberNR_IRQ_LEGACY.
That's not a typo. That's on purpose.
We don't want to allocate a gazillion of interrupt descriptors for nothing. The only ones which must be pre-allocated are the legacy ones.
Quoted 1 line
This patch makes sure the calculated value is returned intead.
And therefor defeats the whole purpose of sparse irqs.
I'll zap that commit.
Quoted 23 lines
Signed-off-by David Cohen <[email protected]>Cc Thomas Gleixner <[email protected]>Signed-off-by Ingo Molnar <[email protected]>--- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/apic/io_apic.c +1
-1@@ -3437,7 +3437,7 @@ int __init arch_probe_nr_irqs(void)if (nr < nr_irqs) nr_irqs = nr; -return NR_IRQS_LEGACY ; +return nr; } int io_apic_set_pci_routing(struct device *dev, int irq,
Re: [tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
Quoted 21 lines · Thomas Gleixner
Quoted 7 lines · tip-bot for David Cohen
Commit-ID: 8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Gitweb: http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0 Author: David Cohen <[email protected]> AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 May 2013 12:01:29 +0200Quoted 5 lines
irq/x86/io_apic: Fix number of pre-allocated irqs
arch_probe_nr_irqs()has a typo when returning number of preallocated irqs. Instead of returning the calculated value, it returns a constant numberNR_IRQ_LEGACY.That's not a typo. That's on purpose.
We don't want to allocate a gazillion of interrupt descriptors for nothing. The only ones which must be pre-allocated are the legacy ones.
Quoted 5 lines
Quoted 1 line
This patch makes sure the calculated value is returned intead.
And therefor defeats the whole purpose of sparse irqs.
I'll zap that commit.
Oops, I had a sneaking suspicion about this change but did not read the code far enough - thanks for correcting my brainfart!
Thanks,
Ingo