[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 3/5] xen: arm: slightly refactor gic DT node creation for domain 0
all gics. Although in principal #interrupt-cells can vary it must always be 3 for a GIC (and we only support GIC as a guest interrupt controller), so putting it in common code is OK. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v3: Retitle and reword, was "xen: arm: propagate gic's #interrupt-cells property to dom0." --- xen/arch/arm/domain_build.c | 8 ++++++++ xen/arch/arm/gic-hip04.c | 9 --------- xen/arch/arm/gic-v2.c | 9 --------- xen/arch/arm/gic-v3.c | 8 -------- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 24a0242..e9307f6 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -847,6 +847,14 @@ static int make_gic_node(const struct domain *d, void *fdt, return res; } + res = fdt_property_cell(fdt, "#interrupt-cells", 3); + if ( res ) + return res; + + res = fdt_property(fdt, "interrupt-controller", NULL, 0); + if ( res ) + return res; + res = fdt_end_node(fdt); return res; diff --git a/xen/arch/arm/gic-hip04.c b/xen/arch/arm/gic-hip04.c index 073ad33..223c414 100644 --- a/xen/arch/arm/gic-hip04.c +++ b/xen/arch/arm/gic-hip04.c @@ -636,15 +636,6 @@ static int hip04gic_make_dt_node(const struct domain *d, if ( res ) return res; - res = fdt_property_cell(fdt, "#interrupt-cells", 3); - if ( res ) - return res; - - res = fdt_property(fdt, "interrupt-controller", NULL, 0); - - if ( res ) - return res; - /* * DTB provides up to 4 regions to handle virtualization * (in order GICD, GICC, GICH and GICV interfaces) diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index 1a639e0..073fec2 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -624,15 +624,6 @@ static int gicv2_make_dt_node(const struct domain *d, if ( res ) return res; - res = fdt_property_cell(fdt, "#interrupt-cells", 3); - if ( res ) - return res; - - res = fdt_property(fdt, "interrupt-controller", NULL, 0); - - if ( res ) - return res; - /* * DTB provides up to 4 regions to handle virtualization * (in order GICD, GICC, GICH and GICV interfaces) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index b0f498e..e9a8eda 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1106,14 +1106,6 @@ static int gicv3_make_dt_node(const struct domain *d, if ( res ) return res; - res = fdt_property_cell(fdt, "#interrupt-cells", 3); - if ( res ) - return res; - - res = fdt_property(fdt, "interrupt-controller", NULL, 0); - if ( res ) - return res; - res = dt_property_read_u32(gic, "redistributor-stride", &rd_stride); if ( !res ) rd_stride = 0; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |