This patch adds support for systems that cannot receive every interrupt on a single cpu simultaneously, in the check to see if we have enough HARDIRQ_BITS. MAX_HARDIRQS_PER_CPU becomes the count of the maximum number of hardare generated interrupts per cpu. On architectures that support per cpu interrupt delivery this can be a significant space savings and scalability bonus. This patch adds support for systems that cannot receive every interrupt on Signed-off-by: Eric W. Biederman <[email protected]> --- include/asm-x86_64/hardirq.h | 3 +++ include/linux/hardirq.h | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 64a65ce..95d5e09 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h @@ -6,6 +6,9 @@ #include <linux/irq.h> #include <asm/pda.h> #include <asm/apic.h> +/* We can have at most NR_VECTORS irqs routed to a cpu at a time */ +#define MAX_HARDIRQS_PER_CPU NR_VECTORS + #define __ARCH_IRQ_STAT 1 #define local_softirq_pending() read_pda(__softirq_pending) diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index ccabda7..f60b8c3 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -27,11 +27,16 @@ #define SOFTIRQ_BITS 8 #ifndef HARDIRQ_BITS #define HARDIRQ_BITS 12 + +#ifndef MAX_HARDIRQS_PER_CPU +#define MAX_HARDIRQS_PER_CPU NR_IRQS +#endif + /* * The hardirq mask has to be large enough to have space for potentially * all IRQ sources in the system nesting on a single CPU. */ -#if (1 << HARDIRQ_BITS) < NR_IRQS +#if (1 << HARDIRQ_BITS) < MAX_HARDIRQS_PER_CPU # error HARDIRQ_BITS is too low! #endif #endif -- 1.4.0.gc07e - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH 21/25] x86_64 irq: Make the external irq handlers report their vector, not the irq number.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 21/25] x86_64 irq: Make the external irq handlers report their vector, not the irq number.
- References:
- [PATCH 0/25] Decouple IRQ issues (MSI, i386, x86_64, ia64)
- From: [email protected] (Eric W. Biederman)
- [PATCH 1/25] irq: Convert the move_irq flag from a 32bit word to a single bit
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 2/25] irq: Add moved_masked_irq
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 3/25] x86_64 irq: Reenable migrating irqs to other cpus.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 4/25] msi: Simplify msi enable and disable.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 5/25] msi: Make the msi boolean tests return either 0 or 1.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 6/25] msi: Implement helper functions read_msi_msg and write_msi_msg.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 7/25] msi: Refactor the msi_ops.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 8/25] msi: Simplify the msi irq limit policy.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 9/25] irq: Add a dynamic irq creation API
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 10/25] ia64 irq: Dynamic irq support
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 11/25] i386 irq: Dynamic irq support
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 12/25] x86_64 irq: Dynamic irq support
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 13/25] msi: Make the msi code irq based and not vector based.
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 14/25] x86_64 irq: Move msi message composition into io_apic.c
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 15/25] i386 irq: Move msi message composition into io_apic.c
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 16/25] msi: Only build msi-apic.c on ia64
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 17/25] x86_64 irq: Remove the msi assumption that irq == vector
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 19/25] irq: Remove msi hacks
- From: "Eric W. Biederman" <[email protected]>
- [PATCH 0/25] Decouple IRQ issues (MSI, i386, x86_64, ia64)
- Prev by Date: [PATCH 1/25] irq: Convert the move_irq flag from a 32bit word to a single bit
- Next by Date: [PATCH 10/25] ia64 irq: Dynamic irq support
- Previous by thread: [PATCH 19/25] irq: Remove msi hacks
- Next by thread: [PATCH 21/25] x86_64 irq: Make the external irq handlers report their vector, not the irq number.
- Index(es):