mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
2e9b1c655f
commit
b819187a15
2 files changed
+3
-1
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||