ia64/xen-unstable
changeset 18822:e7da388ff95d
x86: make NR_IRQS build-time configurable
While keeping the NR_IRQS default at 256 here, I think it would be a
good thing to set it to a higher value to make sure no new mixing of
irq and vector spaces slip in.
Tested with NR_IRQS forced to 1024.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
While keeping the NR_IRQS default at 256 here, I think it would be a
good thing to set it to a higher value to make sure no new mixing of
irq and vector spaces slip in.
Tested with NR_IRQS forced to 1024.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Nov 20 14:23:59 2008 +0000 (2008-11-20) |
parents | 935bd48f096a |
children | cd45b5c95612 |
files | xen/Rules.mk xen/include/asm-x86/config.h xen/include/asm-x86/domain.h xen/include/asm-x86/mach-default/irq_vectors.h |
line diff
1.1 --- a/xen/Rules.mk Thu Nov 20 14:23:33 2008 +0000 1.2 +++ b/xen/Rules.mk Thu Nov 20 14:23:59 2008 +0000 1.3 @@ -69,6 +69,9 @@ CFLAGS-$(frame_pointer) += -fno-omit-fra 1.4 ifneq ($(max_phys_cpus),) 1.5 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus) 1.6 endif 1.7 +ifneq ($(max_phys_irqs),) 1.8 +CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) 1.9 +endif 1.10 1.11 AFLAGS-y += -D__ASSEMBLY__ 1.12
2.1 --- a/xen/include/asm-x86/config.h Thu Nov 20 14:23:33 2008 +0000 2.2 +++ b/xen/include/asm-x86/config.h Thu Nov 20 14:23:59 2008 +0000 2.3 @@ -51,6 +51,12 @@ 2.4 #define NR_CPUS 32 2.5 #endif 2.6 2.7 +#ifdef MAX_PHYS_IRQS 2.8 +#define NR_IRQS MAX_PHYS_IRQS 2.9 +#else 2.10 +#define NR_IRQS 256 2.11 +#endif 2.12 + 2.13 #if defined(__i386__) && (NR_CPUS > 32) 2.14 #error "Maximum of 32 physical processors supported by Xen on x86_32" 2.15 #endif
3.1 --- a/xen/include/asm-x86/domain.h Thu Nov 20 14:23:33 2008 +0000 3.2 +++ b/xen/include/asm-x86/domain.h Thu Nov 20 14:23:59 2008 +0000 3.3 @@ -236,7 +236,7 @@ struct arch_domain 3.4 3.5 /* NB. protected by d->event_lock and by irq_desc[vector].lock */ 3.6 int vector_pirq[NR_VECTORS]; 3.7 - int pirq_vector[NR_IRQS]; 3.8 + s16 pirq_vector[NR_IRQS]; 3.9 3.10 /* Pseudophysical e820 map (XENMEM_memory_map). */ 3.11 struct e820entry e820[3];
4.1 --- a/xen/include/asm-x86/mach-default/irq_vectors.h Thu Nov 20 14:23:33 2008 +0000 4.2 +++ b/xen/include/asm-x86/mach-default/irq_vectors.h Thu Nov 20 14:23:59 2008 +0000 4.3 @@ -30,7 +30,4 @@ 4.4 4.5 #define NR_VECTORS 256 4.6 4.7 -/* Limited by number of trap vectors. */ 4.8 -#define NR_IRQS NR_VECTORS 4.9 - 4.10 #endif /* _ASM_IRQ_VECTORS_H */