ARM: make nr_irqs a constant

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>
This commit is contained in:
Andre Przywara authored and Stefano Stabellini committed 2018-02-08 13:18:12 -08:00
1 parent e7bc3a180a
commit 5eaa17357b
2 files changed
+2 -2

No files matched your search

+1 -1
View 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);
+1 -1
View 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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.