public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, io_apic: Fix number of pre-allocated irqs
@ 2013-04-30 23:20 David Cohen
  2013-05-28 13:38 ` [tip:irq/core] irq/x86/io_apic: " tip-bot for David Cohen
  0 siblings, 1 reply; 4+ messages in thread
From: David Cohen @ 2013-04-30 23:20 UTC (permalink / raw)
  To: mingo, joro, hpa; +Cc: x86, linux-kernel, David Cohen

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.

Signed-off-by: David Cohen <david.a.cohen@intel.com>
---
 arch/x86/kernel/apic/io_apic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ed796c..7ef2bd9 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -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,
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
  2013-04-30 23:20 [PATCH] x86, io_apic: Fix number of pre-allocated irqs David Cohen
@ 2013-05-28 13:38 ` tip-bot for David Cohen
  2013-05-29  9:08   ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: tip-bot for David Cohen @ 2013-05-28 13:38 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, david.a.cohen

Commit-ID:  8c956b1b935ec98decb470a6abff8c1f8b28e9f0
Gitweb:     http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0
Author:     David Cohen <david.a.cohen@intel.com>
AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: David Cohen <david.a.cohen@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: joro@8bytes.org
Link: http://lkml.kernel.org/r/1367364015-12521-1-git-send-email-david.a.cohen@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/io_apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ed796c..7ef2bd9 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -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,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
  2013-05-28 13:38 ` [tip:irq/core] irq/x86/io_apic: " tip-bot for David Cohen
@ 2013-05-29  9:08   ` Thomas Gleixner
  2013-05-29  9:19     ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2013-05-29  9:08 UTC (permalink / raw)
  To: mingo, hpa, linux-kernel, david.a.cohen; +Cc: linux-tip-commits

On Tue, 28 May 2013, tip-bot for David Cohen wrote:

> Commit-ID:  8c956b1b935ec98decb470a6abff8c1f8b28e9f0
> Gitweb:     http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0
> Author:     David Cohen <david.a.cohen@intel.com>
> AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700
> Committer:  Ingo Molnar <mingo@kernel.org>
> 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.

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.

> This patch makes sure the calculated value is returned intead.

And therefor defeats the whole purpose of sparse irqs.

I'll zap that commit.
 
> Signed-off-by: David Cohen <david.a.cohen@intel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: joro@8bytes.org
> Link: http://lkml.kernel.org/r/1367364015-12521-1-git-send-email-david.a.cohen@intel.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  arch/x86/kernel/apic/io_apic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 9ed796c..7ef2bd9 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -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,
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:irq/core] irq/x86/io_apic: Fix number of pre-allocated irqs
  2013-05-29  9:08   ` Thomas Gleixner
@ 2013-05-29  9:19     ` Ingo Molnar
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2013-05-29  9:19 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: hpa, linux-kernel, david.a.cohen, linux-tip-commits


* Thomas Gleixner <tglx@linutronix.de> wrote:

> On Tue, 28 May 2013, tip-bot for David Cohen wrote:
> 
> > Commit-ID:  8c956b1b935ec98decb470a6abff8c1f8b28e9f0
> > Gitweb:     http://git.kernel.org/tip/8c956b1b935ec98decb470a6abff8c1f8b28e9f0
> > Author:     David Cohen <david.a.cohen@intel.com>
> > AuthorDate: Tue, 30 Apr 2013 16:20:15 -0700
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > 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.
> 
> 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.
> 
> > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-29  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-30 23:20 [PATCH] x86, io_apic: Fix number of pre-allocated irqs David Cohen
2013-05-28 13:38 ` [tip:irq/core] irq/x86/io_apic: " tip-bot for David Cohen
2013-05-29  9:08   ` Thomas Gleixner
2013-05-29  9:19     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox