x86: make NR_IRQS build-time configurable
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Nov 2008 14:23:59 +0000 (14:23 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Nov 2008 14:23:59 +0000 (14:23 +0000)
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>
xen/Rules.mk
xen/include/asm-x86/config.h
xen/include/asm-x86/domain.h
xen/include/asm-x86/mach-default/irq_vectors.h

index 36292c92e54e69afa09556d76b8ea1f88ba4f16e..43a4f632493efb879a4b3ad9618fbc69da48979b 100644 (file)
@@ -69,6 +69,9 @@ CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 ifneq ($(max_phys_cpus),)
 CFLAGS-y                += -DMAX_PHYS_CPUS=$(max_phys_cpus)
 endif
+ifneq ($(max_phys_irqs),)
+CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
+endif
 
 AFLAGS-y                += -D__ASSEMBLY__
 
index 815eb4a95df16b71c3a5183c9c9b3d1f4aebae5a..aa9b234370cce33dbb75317b8691da29ba8e3976 100644 (file)
 #define NR_CPUS 32
 #endif
 
+#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 fb95c064ad3a564085606bd313b057a676cc8dfd..15896153632ea0c0ea55638abc42d7529c6a8371 100644 (file)
@@ -236,7 +236,7 @@ struct arch_domain
 
     /* 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];
 
     /* Pseudophysical e820 map (XENMEM_memory_map).  */
     struct e820entry e820[3];
index 626e6cd1b5fdc92b36cbd49f7a2c12fe1c6d1fc2..057b2a35b828ede9eff1550e6ba847b009262cc5 100644 (file)
@@ -30,7 +30,4 @@
 
 #define NR_VECTORS 256
 
-/* Limited by number of trap vectors. */
-#define NR_IRQS        NR_VECTORS
-
 #endif /* _ASM_IRQ_VECTORS_H */