[PATCH] x86: make NR_IRQS on 32bit is same to 64bit - Kernel

This is a discussion on [PATCH] x86: make NR_IRQS on 32bit is same to 64bit - Kernel ; Impact: so NR_IRQS is bigger enough for system with lots of apic/pins Now: if IO_APIC is there, will have big NR_IRQS otherwise still use 224 Signed-off-by: Yinghai --- arch/x86/include/asm/irq_vectors.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) Index: ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [PATCH] x86: make NR_IRQS on 32bit is same to 64bit

  1. [PATCH] x86: make NR_IRQS on 32bit is same to 64bit



    Impact: so NR_IRQS is bigger enough for system with lots of apic/pins

    Now: if IO_APIC is there, will have big NR_IRQS

    otherwise still use 224

    Signed-off-by: Yinghai

    ---
    arch/x86/include/asm/irq_vectors.h | 20 ++++++--------------
    1 file changed, 6 insertions(+), 14 deletions(-)

    Index: linux-2.6/arch/x86/include/asm/irq_vectors.h
    ================================================== =================
    --- linux-2.6.orig/arch/x86/include/asm/irq_vectors.h
    +++ linux-2.6/arch/x86/include/asm/irq_vectors.h
    @@ -101,30 +101,22 @@
    #define LAST_VM86_IRQ 15
    #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)

    -#ifdef CONFIG_X86_64
    +#if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_PARAVIRT) && !defined(CONFIG_X86_VISWS) && !defined(CONFIG_X86_VOYAGER)
    # if NR_CPUS < MAX_IO_APICS
    # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
    # else
    # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
    # endif

    -#elif !defined(CONFIG_X86_VOYAGER)
    +#elif defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) || defined(CONFIG_X86_VOYAGER)

    -# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
    -
    -# define NR_IRQS 224
    -
    -# else /* IO_APIC || PARAVIRT */
    -
    -# define NR_IRQS 16
    -
    -# endif
    +# define NR_IRQS 224

    -#else /* !VISWS && !VOYAGER */
    +#else /* IO_APIC || PARAVIRT */

    -# define NR_IRQS 224
    +# define NR_IRQS 16

    -#endif /* VISWS */
    +#endif

    /* Voyager specific defines */
    /* These define the CPIs we use in linux */
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] x86: make NR_IRQS on 32bit is same to 64bit

    On Tue, 2008-11-04 at 14:10 -0800, Yinghai Lu wrote:
    >
    > Impact: so NR_IRQS is bigger enough for system with lots of apic/pins
    >
    > Now: if IO_APIC is there, will have big NR_IRQS
    >
    > otherwise still use 224

    [...]

    I have no idea whether this is useful, but it doesn't solve the general
    problem that probe_nr_irqs() can return a value > NR_IRQS. So far as I
    can see it can return up to 2 * 24 * MAX_IO_APICS which may be greater
    than NR_VECTORS + (32 * max(MAX_IO_APICS, NR_CPUS)).

    Ben.

    --
    Ben Hutchings, Senior Software Engineer, Solarflare Communications
    Not speaking for my employer; that's the marketing department's job.
    They asked us to note that Solarflare product names are trademarked.

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH] x86: make NR_IRQS on 32bit is same to 64bit

    Ben Hutchings wrote:
    > On Tue, 2008-11-04 at 14:10 -0800, Yinghai Lu wrote:
    >> Impact: so NR_IRQS is bigger enough for system with lots of apic/pins
    >>
    >> Now: if IO_APIC is there, will have big NR_IRQS
    >>
    >> otherwise still use 224

    > [...]
    >
    > I have no idea whether this is useful, but it doesn't solve the general
    > problem that probe_nr_irqs() can return a value > NR_IRQS. So far as I
    > can see it can return up to 2 * 24 * MAX_IO_APICS which may be greater
    > than NR_VECTORS + (32 * max(MAX_IO_APICS, NR_CPUS)).


    your patch is still needed...
    also please add one WARN_ON when nr > NR_IRQS.

    YH
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread