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

[Xen-devel] [PATCH] arm: cast int<->pointer via uintptr_t

Fixes build on arm64:

gic.c: In function âgic_irq_eoiâ:
        gic.c:726:16: error: cast from pointer to integer of different size 
        gic.c: In function âmaintenance_interruptâ:
        gic.c:776:29: error: cast to pointer from integer of different size 
        gic.c:778:64: error: cast to pointer from integer of different size 
        cc1: all warnings being treated as errors
        make[3]: *** [gic.o] Error 1

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Acked-by: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
I forgot to CC the list when I sent this to Stefano & Keir. Given that they
have acked already I intend to apply immediately.
 xen/arch/arm/gic.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 8d35e0e..9ebfebe 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -723,7 +723,7 @@ int gicv_setup(struct domain *d)
 static void gic_irq_eoi(void *info)
-    int virq = (int) info;
+    int virq = (uintptr_t) info;
     GICC[GICC_DIR] = virq;
@@ -773,9 +773,10 @@ static void maintenance_interrupt(int irq, void *dev_id, 
struct cpu_user_regs *r
             /* this is not racy because we can't receive another irq of the
              * same type until we EOI it.  */
             if ( cpu == smp_processor_id() )
-                gic_irq_eoi((void*)virq);
+                gic_irq_eoi((void*)(uintptr_t)virq);
-                on_selected_cpus(cpumask_of(cpu), gic_irq_eoi, (void*)virq, 0);
+                on_selected_cpus(cpumask_of(cpu),
+                                 gic_irq_eoi, (void*)(uintptr_t)virq, 0);

Xen-devel mailing list



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