Re: [RFT][PATCH] i386 per cpu IDT (2.6.12-rc1-mm1)

From: Chuck Ebbert
Date: Mon Sep 26 2005 - 22:47:06 EST


In-Reply-To: <Pine.LNX.4.61.0509251101060.1684@xxxxxxxxxxxxxxxxxxxxx>

On Sun, 25 Sep 2005 at 11:01:29 -0700, Zwane Mwaikambo wrote:

> --- linux-2.6.14-rc2-mm1/arch/i386/kernel/entry.S 24 Sep 2005 18:26:49 -0000 1.1.1.1
> +++ linux-2.6.14-rc2-mm1/arch/i386/kernel/entry.S 25 Sep 2005 05:15:29 -0000
> @@ -410,27 +410,18 @@ syscall_badsys:
> FIXUP_ESPFIX_STACK \
> 28: popl %eax;
>
> -/*
> - * Build the entry stubs and pointer table with
> - * some assembler magic.
> - */
> -.data
> -ENTRY(interrupt)
> -.text
> -
> +/* Build the IRQ entry stubs */
> vector=0
> -ENTRY(irq_entries_start)
> + .align IRQ_STUB_SIZE,0x90
> +ENTRY(interrupt)
> .rept NR_IRQS
> ALIGN <===================================
> -1: pushl $vector-256
> + pushl $vector-0x10000
> jmp common_interrupt
> -.data
> - .long 1b
> -.text
> + .align IRQ_STUB_SIZE,0x90
> vector=vector+1
> .endr
>
> - ALIGN
> common_interrupt:
> SAVE_ALL
> movl %esp,%eax

That ALIGN could cause problems if someone changed default i386 alignment to
something larger than IRQ_STUB_SIZE. Why is it there?


> --- linux-2.6.14-rc2-mm1/include/asm-i386/mach-default/irq_vectors_limits.h 24 Sep 2005 18:27:12 -0000 1.1.1.1
> +++ linux-2.6.14-rc2-mm1/include/asm-i386/mach-default/irq_vectors_limits.h 25 Sep 2005 05:15:35 -0000
> @@ -2,11 +2,15 @@
> #define _ASM_IRQ_VECTORS_LIMITS_H
>
> #ifdef CONFIG_PCI_MSI
> -#define NR_IRQS FIRST_SYSTEM_VECTOR
> +#define NR_IRQS 224
> +#define IRQ_STUB_SIZE 16
> #define NR_IRQ_VECTORS NR_IRQS
> +#define NR_IRQ_NODES MAX_NUMNODES
> #else
> #ifdef CONFIG_X86_IO_APIC
> #define NR_IRQS 224
> +#define IRQ_STUB_SIZE 16
> +#define NR_IRQ_NODES MAX_NUMNODES
> # if (224 >= 32 * NR_CPUS)
> # define NR_IRQ_VECTORS NR_IRQS
> # else
> @@ -14,8 +18,13 @@
> # endif
> #else
> #define NR_IRQS 16
> +#define IRQ_STUB_SIZE 16 <=================================
> +#define NR_IRQ_NODES 1
> #define NR_IRQ_VECTORS NR_IRQS
> #endif
> #endif
>
> +/* number of vectors available for external interrupts in Linux */
> +#define NR_DEVICE_VECTORS 190
> +
> #endif /* _ASM_IRQ_VECTORS_LIMITS_H */

Can't these be 8 bytes when there are only 16 IRQs?

And is there any way to special-case kernels built with max of two CPUs so there are
only 24 IRQs allocated? That seems to be the maximum for that case.

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