[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] ARM: vGIC: fix nr_irq definition



commit b819187a15ecea7fe00cffded1bf454b8a6d7dd2
Author:     Andre Przywara <andre.przywara@xxxxxxx>
AuthorDate: Thu Oct 19 13:48:37 2017 +0100
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Dec 8 13:14:47 2017 -0800

    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@xxxxxxx>
---
 xen/arch/arm/irq.c        | 2 ++
 xen/include/asm-arm/irq.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index cbc7e6e..7f133de 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -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);
 
diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h
index 2de76d0..abc8f06 100644
--- a/xen/include/asm-arm/irq.h
+++ b/xen/include/asm-arm/irq.h
@@ -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
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.