ARM: vGIC: fix nr_irq definition

The global variable "nr_irqs" is used for x86 and some common Xen code.
To make the latter work easily for ARM, it was #defined to NR_IRQS.
This not only violated the common habit of capitalizing macros, but
also caused issues if one wanted to use a rather innocent "nr_irqs" as
a local variable name or as a function parameter.
Drop the optimization and make nr_irqs a normal variable for ARM also.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
Andre Przywara authored and Stefano Stabellini committed 2017-12-08 13:14:47 -08:00
1 parent 2e9b1c655f
commit b819187a15
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -27,6 +27,8 @@
#include <asm/gic.h>
#include <asm/vgic.h>
unsigned int __read_mostly nr_irqs = NR_IRQS;
static unsigned int local_irqs_type[NR_LOCAL_IRQS];
static DEFINE_SPINLOCK(local_irqs_type_lock);
+1 -1
View File
@@ -31,7 +31,7 @@ struct arch_irq_desc {
/* LPIs are always numbered starting at 8192, so 0 is a good invalid case. */
#define INVALID_LPI 0
#define nr_irqs NR_IRQS
extern 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.