2008-08-19 16:55:13

by Alex Nixon

[permalink] [raw]
Subject: [PATCH] X86: Change the default value of nr_irqs from 32 to NR_IRQs

From: Alex Nixon <[email protected]>
Date: Tue, 19 Aug 2008 17:49:37 +0100
Subject: [PATCH] X86: Change the default value of nr_irqs from 32 to NR_IRQs

If the number of discovered IRQs is suspiciously low, this patch causes the number reported to default to NR_IRQS, rather than 32. NR_IRQS has already been defined to be a sensible value for the current system (in particular, at least 224 when paravirtualisation is involved).

Signed-off-by: Alex Nixon <[email protected]>
---
arch/x86/kernel/io_apic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 30ff794..11bffa1 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3632,7 +3632,7 @@ int __init probe_nr_irqs(void)

/* something wrong ? */
if (nr < 32)
- nr = 32;
+ nr = NR_IRQS;

return nr;
}
--
1.5.4.3


2008-08-19 17:44:53

by Yinghai Lu

[permalink] [raw]
Subject: Re: [PATCH] X86: Change the default value of nr_irqs from 32 to NR_IRQs

On Tue, Aug 19, 2008 at 9:55 AM, Alex Nixon <[email protected]> wrote:
> From: Alex Nixon <[email protected]>
> Date: Tue, 19 Aug 2008 17:49:37 +0100
> Subject: [PATCH] X86: Change the default value of nr_irqs from 32 to NR_IRQs
>
> If the number of discovered IRQs is suspiciously low, this patch causes the number reported to default to NR_IRQS, rather than 32. NR_IRQS has already been defined to be a sensible value for the current system (in particular, at least 224 when paravirtualisation is involved).
>
> Signed-off-by: Alex Nixon <[email protected]>
> ---
> arch/x86/kernel/io_apic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
> index 30ff794..11bffa1 100644
> --- a/arch/x86/kernel/io_apic.c
> +++ b/arch/x86/kernel/io_apic.c
> @@ -3632,7 +3632,7 @@ int __init probe_nr_irqs(void)
>
> /* something wrong ? */
> if (nr < 32)
> - nr = 32;
> + nr = NR_IRQS;
>
> return nr;
> }
> --
if only one ioapic, nr will be 24<<1, you will get 48. Does pv has io apic ?

YH