All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm/gic-v3: Fix driver probe fail on GICv4 hardware
@ 2016-05-26 23:59 Shanker Donthineni
  2016-05-27 12:35 ` Julien Grall
  0 siblings, 1 reply; 6+ messages in thread
From: Shanker Donthineni @ 2016-05-26 23:59 UTC (permalink / raw)
  To: xen-devel
  Cc: Philip Elcan, Julien Grall, Stefano Stabellini,
	Shanker Donthineni, Vikram Sethi

The current driver probe fails on hardware which has GICv4 version,
even though it is fully compatible to GICv3. This patch fixes the
issue by registering the same probe function for GICv4 hardware.

Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
---
 xen/arch/arm/gic-v3.c     | 13 +++++++++++++
 xen/include/asm-arm/gic.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index a095064..594cf6e 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1604,10 +1604,23 @@ static int __init gicv3_acpi_preinit(const void *data)
     return 0;
 }
 
+static int __init gicv4_acpi_preinit(const void *data)
+{
+    gicv3_info.hw_version = GIC_V4;
+    register_gic_ops(&gicv3_ops);
+
+    return 0;
+}
+
 ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_GIC)
         .class_type = ACPI_MADT_GIC_VERSION_V3,
         .init = gicv3_acpi_preinit,
 ACPI_DEVICE_END
+
+ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_GIC)
+        .class_type = ACPI_MADT_GIC_VERSION_V4,
+        .init = gicv4_acpi_preinit,
+ACPI_DEVICE_END
 #endif
 
 /*
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index cd97bb2..5be814a 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -218,6 +218,7 @@ struct gic_lr {
 enum gic_version {
     GIC_V2,
     GIC_V3,
+    GIC_V4,
 };
 
 extern enum gic_version gic_hw_version(void);
-- 
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
a Linux Foundation Collaborative Project


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-27 15:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26 23:59 [PATCH] arm/gic-v3: Fix driver probe fail on GICv4 hardware Shanker Donthineni
2016-05-27 12:35 ` Julien Grall
2016-05-27 13:48   ` Shanker Donthineni
2016-05-27 14:07     ` Julien Grall
2016-05-27 14:31       ` Shanker Donthineni
2016-05-27 15:00         ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.