Message ID | 1414144717-32328-1-git-send-email-ian.campbell@citrix.com |
---|---|
State | New |
Headers | show |
Hi Ian, On 24/10/2014 10:58, Ian Campbell wrote: > The interrupt-map property requires that the interrupt-parent node > must have both #address-cells and #interrupt-cells properties (see > ePAPR 2.4.3.1). Therefore propagate the property if it is present. > > We must propagate (rather than invent our own value) since this value > is used to size fields within other properties within the tree. > > ePAPR strictly speaking requires that the interrupt-parent node > always has these properties. However reality has diverged from this > and implementations will recursively search parents for #*-cells > properties. Hence we only copy if it is present. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Without this patch I can't boot Xen on the Foundation model with GIC-v3. Is it possible to push this patch for Xen 4.5 rc1? Regards,
On Wed, 2014-10-29 at 19:03 +0000, Julien Grall wrote: > Hi Ian, > > On 24/10/2014 10:58, Ian Campbell wrote: > > The interrupt-map property requires that the interrupt-parent node > > must have both #address-cells and #interrupt-cells properties (see > > ePAPR 2.4.3.1). Therefore propagate the property if it is present. > > > > We must propagate (rather than invent our own value) since this value > > is used to size fields within other properties within the tree. > > > > ePAPR strictly speaking requires that the interrupt-parent node > > always has these properties. However reality has diverged from this > > and implementations will recursively search parents for #*-cells > > properties. Hence we only copy if it is present. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Reviewed-by: Julien Grall <julien.grall@linaro.org> > > Without this patch I can't boot Xen on the Foundation model with GIC-v3. > Is it possible to push this patch for Xen 4.5 rc1? rc1 is long gone... I'll push for rc2 though. Ian.
On 30/10/2014 10:06, Ian Campbell wrote: > On Wed, 2014-10-29 at 19:03 +0000, Julien Grall wrote: >> Hi Ian, >> >> On 24/10/2014 10:58, Ian Campbell wrote: >>> The interrupt-map property requires that the interrupt-parent node >>> must have both #address-cells and #interrupt-cells properties (see >>> ePAPR 2.4.3.1). Therefore propagate the property if it is present. >>> >>> We must propagate (rather than invent our own value) since this value >>> is used to size fields within other properties within the tree. >>> >>> ePAPR strictly speaking requires that the interrupt-parent node >>> always has these properties. However reality has diverged from this >>> and implementations will recursively search parents for #*-cells >>> properties. Hence we only copy if it is present. >>> >>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> >> >> Reviewed-by: Julien Grall <julien.grall@linaro.org> >> >> Without this patch I can't boot Xen on the Foundation model with GIC-v3. >> Is it possible to push this patch for Xen 4.5 rc1? > > rc1 is long gone... I'll push for rc2 though. Hmm right, I though the first version was rc0 not rc1.
On Wed, 2014-10-29 at 19:03 +0000, Julien Grall wrote: > Hi Ian, > > On 24/10/2014 10:58, Ian Campbell wrote: > > The interrupt-map property requires that the interrupt-parent node > > must have both #address-cells and #interrupt-cells properties (see > > ePAPR 2.4.3.1). Therefore propagate the property if it is present. > > > > We must propagate (rather than invent our own value) since this value > > is used to size fields within other properties within the tree. > > > > ePAPR strictly speaking requires that the interrupt-parent node > > always has these properties. However reality has diverged from this > > and implementations will recursively search parents for #*-cells > > properties. Hence we only copy if it is present. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Reviewed-by: Julien Grall <julien.grall@linaro.org> > > Without this patch I can't boot Xen on the Foundation model with GIC-v3. > Is it possible to push this patch for Xen 4.5 rc1? Konrad, I think this is needed for 4.5 since without it dom0 can fail to parse certain other constructs within the DT (in bits which we don't generate and can't easily/don't want to rewrite as we pass them through). The risk is that some bit of DT which we do generate relies on this value being absent (as it was before this patch). I don't believe we generate any such nodes. The consumers are typically nodes representing devices which we pass through rather than messing with them. Ian.
On Tue, Nov 04, 2014 at 10:23:55AM +0000, Ian Campbell wrote: > On Wed, 2014-10-29 at 19:03 +0000, Julien Grall wrote: > > Hi Ian, > > > > On 24/10/2014 10:58, Ian Campbell wrote: > > > The interrupt-map property requires that the interrupt-parent node > > > must have both #address-cells and #interrupt-cells properties (see > > > ePAPR 2.4.3.1). Therefore propagate the property if it is present. > > > > > > We must propagate (rather than invent our own value) since this value > > > is used to size fields within other properties within the tree. > > > > > > ePAPR strictly speaking requires that the interrupt-parent node > > > always has these properties. However reality has diverged from this > > > and implementations will recursively search parents for #*-cells > > > properties. Hence we only copy if it is present. > > > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > > > Reviewed-by: Julien Grall <julien.grall@linaro.org> > > > > Without this patch I can't boot Xen on the Foundation model with GIC-v3. > > Is it possible to push this patch for Xen 4.5 rc1? > > Konrad, I think this is needed for 4.5 since without it dom0 can fail to > parse certain other constructs within the DT (in bits which we don't > generate and can't easily/don't want to rewrite as we pass them > through). Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> > > The risk is that some bit of DT which we do generate relies on this > value being absent (as it was before this patch). I don't believe we > generate any such nodes. The consumers are typically nodes representing > devices which we pass through rather than messing with them. > > Ian. >
On Tue, 2014-11-04 at 12:11 -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Nov 04, 2014 at 10:23:55AM +0000, Ian Campbell wrote: > > On Wed, 2014-10-29 at 19:03 +0000, Julien Grall wrote: > > > Hi Ian, > > > > > > On 24/10/2014 10:58, Ian Campbell wrote: > > > > The interrupt-map property requires that the interrupt-parent node > > > > must have both #address-cells and #interrupt-cells properties (see > > > > ePAPR 2.4.3.1). Therefore propagate the property if it is present. > > > > > > > > We must propagate (rather than invent our own value) since this value > > > > is used to size fields within other properties within the tree. > > > > > > > > ePAPR strictly speaking requires that the interrupt-parent node > > > > always has these properties. However reality has diverged from this > > > > and implementations will recursively search parents for #*-cells > > > > properties. Hence we only copy if it is present. > > > > > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > > > > > Reviewed-by: Julien Grall <julien.grall@linaro.org> > > > > > > Without this patch I can't boot Xen on the Foundation model with GIC-v3. > > > Is it possible to push this patch for Xen 4.5 rc1? > > > > Konrad, I think this is needed for 4.5 since without it dom0 can fail to > > parse certain other constructs within the DT (in bits which we don't > > generate and can't easily/don't want to rewrite as we pass them > > through). > > Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Applied, thanks. Ian.
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 5aca925..de180d8 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -788,6 +788,8 @@ static int make_gic_node(const struct domain *d, void *fdt, { const struct dt_device_node *gic = dt_interrupt_controller; int res = 0; + const void *addrcells; + u32 addrcells_len; /* * Xen currently supports only a single GIC. Discard any secondary @@ -817,6 +819,14 @@ static int make_gic_node(const struct domain *d, void *fdt, return res; } + addrcells = dt_get_property(gic, "#address-cells", &addrcells_len); + if ( addrcells ) + { + res = fdt_property(fdt, "#address-cells", addrcells, addrcells_len); + if ( res ) + return res; + } + res = fdt_end_node(fdt); return res;
The interrupt-map property requires that the interrupt-parent node must have both #address-cells and #interrupt-cells properties (see ePAPR 2.4.3.1). Therefore propagate the property if it is present. We must propagate (rather than invent our own value) since this value is used to size fields within other properties within the tree. ePAPR strictly speaking requires that the interrupt-parent node always has these properties. However reality has diverged from this and implementations will recursively search parents for #*-cells properties. Hence we only copy if it is present. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- xen/arch/arm/domain_build.c | 10 ++++++++++ 1 file changed, 10 insertions(+)