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

Re: [Xen-devel] [PATCH 1/8] arm/gic-v3: Add a separate function for mapping GICD region



Hello Shanker,

On 19/06/16 00:45, Shanker Donthineni wrote:
Move the code that validates base address and does ioremap of GIC
distributor region to a separate function. Later patches need to
access the GICD region inside function gicv3_acpi_init() for
finding per CPU Redistributor size.

This patch contains two things:
   - A clean up: I.e moving the validation/ioremap in a function
   - Calling ioremap map earlier

The latter is the most important point of this patch, not the clean up. However based on your commit message/title, only the clean up matter.

Please reword the commit message/title to make clear what matters.


Signed-off-by: Shanker Donthineni <shankerd@xxxxxxxxxxxxxx>
---
  xen/arch/arm/gic-v3.c | 23 +++++++++++++----------
  1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index 8d3f149..ab1f380 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1169,6 +1169,17 @@ static void __init gicv3_init_v2(void)
      vgic_v2_setup_hw(dbase, cbase, csize, vbase, 0);
  }

+static void __init gicv3_ioremap_distributor(paddr_t dist_paddr)
+{
+    if ( (dist_paddr & ~PAGE_MASK) )

The second pair of brackets is pointless.

+        panic("GICv3:  Found unaligned distributor address %"PRIpaddr"",
+              dbase);
+
+    gicv3.map_dbase = ioremap_nocache(dist_paddr, SZ_64K);
+    if ( !gicv3.map_dbase )
+        panic("GICv3: Failed to ioremap for GIC distributor\n");
+}
+

Regards,

--
Julien Grall

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

 


Rackspace

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