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

[Xen-devel] [Xen-20] Clearing of GICD_ICACTIVER register at boot time.


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: cdeshpan <chaitanya.deshpande@xxxxxxxxxx>
  • Date: Tue, 5 Jun 2018 12:20:51 -0700
  • Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=bestguesspass action=none header.from=xilinx.com;
  • Cc: Chaitanya Deshpande <chaitanyagd11@xxxxxxxxx>, sstabellini@xxxxxxxxxx
  • Delivery-date: Wed, 06 Jun 2018 05:13:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

From: Chaitanya Deshpande <chaitanyagd11@xxxxxxxxx>

Signed-off-by: Chaitanya Deshpande <chaitanyagd11@xxxxxxxxx>
---
 xen/arch/arm/gic-v2.c            | 6 +++++-
 xen/arch/arm/gic-v3.c            | 5 +++++
 xen/arch/arm/vgic-v2.c           | 5 +++++
 xen/arch/arm/vgic-v3.c           | 5 +++++
 xen/arch/arm/vgic/vgic-mmio-v2.c | 5 +++++
 5 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index d2dcafb..6bd7e43 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -5,7 +5,6 @@
  *
  * Tim Deegan <tim@xxxxxxx>
  * Copyright (c) 2011 Citrix Systems.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -1247,6 +1246,11 @@ static int __init gicv2_init(void)
 {
     uint32_t aliased_offset = 0;

+    /* Clear GIC register at boot time */
+    uint32_t *gicd_icactiver;
+    gicd_icactiver = (uint32_t*) GICD_ICACTIVER;
+    *gicd_icactiver = 0;
+
     if ( acpi_disabled )
         gicv2_dt_init();
     else
diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index b2ed0f8..f61d2b3 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1738,6 +1738,11 @@ static int __init gicv3_init(void)
     uint32_t reg;
     unsigned int intid_bits;

+    /* Clear GIC register at boot time */
+    uint32_t *gicd_icactiver;
+    gicd_icactiver = (uint32_t*) GICD_ICACTIVER;
+    *gicd_icactiver = 0;
+
     if ( !cpu_has_gicv3 )
     {
         dprintk(XENLOG_ERR, "GICv3: driver requires system register 
support\n");
diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
index 646d1f3..d8b2761 100644
--- a/xen/arch/arm/vgic-v2.c
+++ b/xen/arch/arm/vgic-v2.c
@@ -727,6 +727,11 @@ static const struct vgic_ops vgic_v2_ops = {

 int vgic_v2_init(struct domain *d, int *mmio_count)
 {
+    /* Clear GIC register at boot time */
+    uint32_t *gicd_icactiver;
+    gicd_icactiver = (uint32_t*) GICD_ICACTIVER;
+    *gicd_icactiver = 0;
+
     if ( !vgic_v2_hw.enabled )
     {
         printk(XENLOG_G_ERR
diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c
index 4b42739..6fe0dac 100644
--- a/xen/arch/arm/vgic-v3.c
+++ b/xen/arch/arm/vgic-v3.c
@@ -1791,6 +1791,11 @@ static const struct vgic_ops v3_ops = {

 int vgic_v3_init(struct domain *d, int *mmio_count)
 {
+    /* Clear GIC register at boot time */
+    uint32_t *gicd_icactiver;
+    gicd_icactiver = (uint32_t*) GICD_ICACTIVER;
+    *gicd_icactiver = 0;
+
     if ( !vgic_v3_hw.enabled )
     {
         printk(XENLOG_G_ERR
diff --git a/xen/arch/arm/vgic/vgic-mmio-v2.c b/xen/arch/arm/vgic/vgic-mmio-v2.c
index 2e507b1..863b4d6 100644
--- a/xen/arch/arm/vgic/vgic-mmio-v2.c
+++ b/xen/arch/arm/vgic/vgic-mmio-v2.c
@@ -305,6 +305,11 @@ static const struct vgic_register_region 
vgic_v2_dist_registers[] = {

 unsigned int vgic_v2_init_dist_iodev(struct vgic_io_device *dev)
 {
+    /* Clear GIC register at boot time */
+    uint32_t *gicd_icactiver;
+    gicd_icactiver = (uint32_t*) GICD_ICACTIVER;
+    *gicd_icactiver = 0;
+
     dev->regions = vgic_v2_dist_registers;
     dev->nr_regions = ARRAY_SIZE(vgic_v2_dist_registers);

--
2.7.4

This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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