diff mbox series

[Xen-devel,01/57] tools: ARM: vGICv3: Avoid inserting optional DT properties

Message ID 20180305160415.16760-2-andre.przywara@linaro.org
State New
Headers show
Series New VGIC(-v2) implementation | expand

Commit Message

Andre Przywara March 5, 2018, 4:03 p.m. UTC
When creating a GICv3 devicetree node, we currently insert the
redistributor-stride and #redistributor-regions properties, with fixed
values which are actually the architected ones. Since those properties are
optional, and in the case of the stride only needed to cover for broken
platforms, we don't need to describe them if they don't differ from the
default values. This will always be the case for our constructed
DomU memory map.
So we drop those properties altogether and provide a clean and architected
GICv3 DT node for DomUs.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
---
Changelog RFC ... v1:
- improve commit message

 tools/libxl/libxl_arm.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Julien Grall March 5, 2018, 4:39 p.m. UTC | #1
(+ tools maintainers)

Hi Andre,

Please don't forget to CC the relevant maintainers.

On 05/03/18 16:03, Andre Przywara wrote:
> When creating a GICv3 devicetree node, we currently insert the
> redistributor-stride and #redistributor-regions properties, with fixed
> values which are actually the architected ones. Since those properties are
> optional, and in the case of the stride only needed to cover for broken
> platforms, we don't need to describe them if they don't differ from the
> default values. This will always be the case for our constructed
> DomU memory map.
> So we drop those properties altogether and provide a clean and architected
> GICv3 DT node for DomUs.
> 
> Signed-off-by: Andre Przywara <andre.przywara@linaro.org>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,

> ---
> Changelog RFC ... v1:
> - improve commit message
> 
>   tools/libxl/libxl_arm.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
> index 86f59c0d80..906fd0dcdf 100644
> --- a/tools/libxl/libxl_arm.c
> +++ b/tools/libxl/libxl_arm.c
> @@ -525,14 +525,6 @@ static int make_gicv3_node(libxl__gc *gc, void *fdt)
>       res = fdt_property(fdt, "interrupt-controller", NULL, 0);
>       if (res) return res;
>   
> -    res = fdt_property_cell(fdt, "redistributor-stride",
> -                            GUEST_GICV3_RDIST_STRIDE);
> -    if (res) return res;
> -
> -    res = fdt_property_cell(fdt, "#redistributor-regions",
> -                            GUEST_GICV3_RDIST_REGIONS);
> -    if (res) return res;
> -
>       res = fdt_property_regs(gc, fdt, ROOT_ADDRESS_CELLS, ROOT_SIZE_CELLS,
>                               2,
>                               gicd_base, gicd_size,
>
Wei Liu March 5, 2018, 5:18 p.m. UTC | #2
On Mon, Mar 05, 2018 at 04:39:09PM +0000, Julien Grall wrote:
> (+ tools maintainers)
> 
> Hi Andre,
> 
> Please don't forget to CC the relevant maintainers.
> 
> On 05/03/18 16:03, Andre Przywara wrote:
> > When creating a GICv3 devicetree node, we currently insert the
> > redistributor-stride and #redistributor-regions properties, with fixed
> > values which are actually the architected ones. Since those properties are
> > optional, and in the case of the stride only needed to cover for broken
> > platforms, we don't need to describe them if they don't differ from the
> > default values. This will always be the case for our constructed
> > DomU memory map.
> > So we drop those properties altogether and provide a clean and architected
> > GICv3 DT node for DomUs.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
> 
> Reviewed-by: Julien Grall <julien.grall@arm.com>
> 

Acked-by: Wei Liu <wei.liu2@citrix.com>

Julien please commit this yourself.
Julien Grall March 6, 2018, 11:16 a.m. UTC | #3
On 05/03/18 17:18, Wei Liu wrote:
> On Mon, Mar 05, 2018 at 04:39:09PM +0000, Julien Grall wrote:
>> (+ tools maintainers)
>>
>> Hi Andre,
>>
>> Please don't forget to CC the relevant maintainers.
>>
>> On 05/03/18 16:03, Andre Przywara wrote:
>>> When creating a GICv3 devicetree node, we currently insert the
>>> redistributor-stride and #redistributor-regions properties, with fixed
>>> values which are actually the architected ones. Since those properties are
>>> optional, and in the case of the stride only needed to cover for broken
>>> platforms, we don't need to describe them if they don't differ from the
>>> default values. This will always be the case for our constructed
>>> DomU memory map.
>>> So we drop those properties altogether and provide a clean and architected
>>> GICv3 DT node for DomUs.
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
>>
>> Reviewed-by: Julien Grall <julien.grall@arm.com>
>>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> Julien please commit this yourself.

Done.

Cheers,
diff mbox series

Patch

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 86f59c0d80..906fd0dcdf 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -525,14 +525,6 @@  static int make_gicv3_node(libxl__gc *gc, void *fdt)
     res = fdt_property(fdt, "interrupt-controller", NULL, 0);
     if (res) return res;
 
-    res = fdt_property_cell(fdt, "redistributor-stride",
-                            GUEST_GICV3_RDIST_STRIDE);
-    if (res) return res;
-
-    res = fdt_property_cell(fdt, "#redistributor-regions",
-                            GUEST_GICV3_RDIST_REGIONS);
-    if (res) return res;
-
     res = fdt_property_regs(gc, fdt, ROOT_ADDRESS_CELLS, ROOT_SIZE_CELLS,
                             2,
                             gicd_base, gicd_size,