]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
ARM: make nr_irqs a constant
authorAndre Przywara <andre.przywara@linaro.org>
Tue, 6 Feb 2018 17:09:03 +0000 (17:09 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 8 Feb 2018 21:18:12 +0000 (13:18 -0800)
On ARM the maximum number of IRQs is a constant, but we share it being
a variable to match x86. Since we are not supposed to alter it, let's
mark it as "const" to avoid accidental change.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/irq.c
xen/include/asm-arm/irq.h

index 62103a20e3035c90347f9ad27a1801e739f524cf..29af10e82c34f695904b83fcffa3ad97206ea78e 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/gic.h>
 #include <asm/vgic.h>
 
-unsigned int __read_mostly nr_irqs = NR_IRQS;
+const unsigned int nr_irqs = NR_IRQS;
 
 static unsigned int local_irqs_type[NR_LOCAL_IRQS];
 static DEFINE_SPINLOCK(local_irqs_type_lock);
index 0d110ecb0860305289d87c9c2c7a1d695c90abf0..9d55e9b1228f8878e8058f0c1418aae5dc7179b8 100644 (file)
@@ -34,7 +34,7 @@ struct arch_irq_desc {
 /* This is a spurious interrupt ID which never makes it into the GIC code. */
 #define INVALID_IRQ     1023
 
-extern unsigned int nr_irqs;
+extern const unsigned int nr_irqs;
 #define nr_static_irqs NR_IRQS
 #define arch_hwdom_irqs(domid) NR_IRQS