From: "Jan Beulich" Subject: [PATCH 3/3] x86: make NR_IRQS build-time configurable Date: Thu, 20 Nov 2008 13:47:58 +0000 Message-ID: <4925789E.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Index: 2008-11-20/xen/Rules.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/xen/Rules.mk 2008-11-19 15:54:15.000000000 = +0100 +++ 2008-11-20/xen/Rules.mk 2008-11-20 08:48:26.000000000 +0100 @@ -69,6 +69,9 @@ CFLAGS-$(frame_pointer) +=3D -fno-omit-fra ifneq ($(max_phys_cpus),) CFLAGS-y +=3D -DMAX_PHYS_CPUS=3D$(max_phys_cpus) endif +ifneq ($(max_phys_irqs),) +CFLAGS-y +=3D -DMAX_PHYS_IRQS=3D$(max_phys_irqs) +endif =20 AFLAGS-y +=3D -D__ASSEMBLY__ =20 Index: 2008-11-20/xen/include/asm-x86/config.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/xen/include/asm-x86/config.h 2008-11-05 = 16:54:22.000000000 +0100 +++ 2008-11-20/xen/include/asm-x86/config.h 2008-11-20 08:48:26.0000000= 00 +0100 @@ -51,6 +51,12 @@ #define NR_CPUS 32 #endif =20 +#ifdef MAX_PHYS_IRQS +#define NR_IRQS MAX_PHYS_IRQS +#else +#define NR_IRQS 256 +#endif + #if defined(__i386__) && (NR_CPUS > 32) #error "Maximum of 32 physical processors supported by Xen on x86_32" #endif Index: 2008-11-20/xen/include/asm-x86/domain.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/xen/include/asm-x86/domain.h 2008-11-19 = 17:37:33.000000000 +0100 +++ 2008-11-20/xen/include/asm-x86/domain.h 2008-11-20 08:48:26.0000000= 00 +0100 @@ -236,7 +236,7 @@ struct arch_domain =20 /* NB. protected by d->event_lock and by irq_desc[vector].lock */ int vector_pirq[NR_VECTORS]; - int pirq_vector[NR_IRQS]; + s16 pirq_vector[NR_IRQS]; =20 /* Pseudophysical e820 map (XENMEM_memory_map). */ struct e820entry e820[3]; Index: 2008-11-20/xen/include/asm-x86/mach-default/irq_vectors.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2008-11-20.orig/xen/include/asm-x86/mach-default/irq_vectors.h = 2008-11-20 08:47:52.000000000 +0100 +++ 2008-11-20/xen/include/asm-x86/mach-default/irq_vectors.h 2008-11-20 = 08:48:26.000000000 +0100 @@ -30,7 +30,4 @@ =20 #define NR_VECTORS 256 =20 -/* Limited by number of trap vectors. */ -#define NR_IRQS NR_VECTORS - #endif /* _ASM_IRQ_VECTORS_H */