Message ID | 20210210142048.3125878-2-edgar.iglesias@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/arm: versal: Use nr_apu_cpus in favor of hard coding 2 | expand |
On 2/10/21 3:20 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com> > > Use nr_apu_cpus in favor of hard coding 2. > > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> > --- > hw/arm/xlnx-versal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c > index b0777166e8..628e77ef66 100644 > --- a/hw/arm/xlnx-versal.c > +++ b/hw/arm/xlnx-versal.c > @@ -67,10 +67,10 @@ static void versal_create_apu_gic(Versal *s, qemu_irq *pic) > gicbusdev = SYS_BUS_DEVICE(&s->fpd.apu.gic); > gicdev = DEVICE(&s->fpd.apu.gic); > qdev_prop_set_uint32(gicdev, "revision", 3); > - qdev_prop_set_uint32(gicdev, "num-cpu", 2); > + qdev_prop_set_uint32(gicdev, "num-cpu", nr_apu_cpus); Or directly XLNX_VERSAL_NR_ACPUS? Regardless: Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > qdev_prop_set_uint32(gicdev, "num-irq", XLNX_VERSAL_NR_IRQS + 32); > qdev_prop_set_uint32(gicdev, "len-redist-region-count", 1); > - qdev_prop_set_uint32(gicdev, "redist-region-count[0]", 2); > + qdev_prop_set_uint32(gicdev, "redist-region-count[0]", nr_apu_cpus); > qdev_prop_set_bit(gicdev, "has-security-extensions", true); > > sysbus_realize(SYS_BUS_DEVICE(&s->fpd.apu.gic), &error_fatal); >
On 2/10/21 3:20 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com> > > Use nr_apu_cpus in favor of hard coding 2. > > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Luc Michel <luc@lmichel.fr> > --- > hw/arm/xlnx-versal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c > index b0777166e8..628e77ef66 100644 > --- a/hw/arm/xlnx-versal.c > +++ b/hw/arm/xlnx-versal.c > @@ -67,10 +67,10 @@ static void versal_create_apu_gic(Versal *s, qemu_irq *pic) > gicbusdev = SYS_BUS_DEVICE(&s->fpd.apu.gic); > gicdev = DEVICE(&s->fpd.apu.gic); > qdev_prop_set_uint32(gicdev, "revision", 3); > - qdev_prop_set_uint32(gicdev, "num-cpu", 2); > + qdev_prop_set_uint32(gicdev, "num-cpu", nr_apu_cpus); > qdev_prop_set_uint32(gicdev, "num-irq", XLNX_VERSAL_NR_IRQS + 32); > qdev_prop_set_uint32(gicdev, "len-redist-region-count", 1); > - qdev_prop_set_uint32(gicdev, "redist-region-count[0]", 2); > + qdev_prop_set_uint32(gicdev, "redist-region-count[0]", nr_apu_cpus); > qdev_prop_set_bit(gicdev, "has-security-extensions", true); > > sysbus_realize(SYS_BUS_DEVICE(&s->fpd.apu.gic), &error_fatal); >
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index b0777166e8..628e77ef66 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -67,10 +67,10 @@ static void versal_create_apu_gic(Versal *s, qemu_irq *pic) gicbusdev = SYS_BUS_DEVICE(&s->fpd.apu.gic); gicdev = DEVICE(&s->fpd.apu.gic); qdev_prop_set_uint32(gicdev, "revision", 3); - qdev_prop_set_uint32(gicdev, "num-cpu", 2); + qdev_prop_set_uint32(gicdev, "num-cpu", nr_apu_cpus); qdev_prop_set_uint32(gicdev, "num-irq", XLNX_VERSAL_NR_IRQS + 32); qdev_prop_set_uint32(gicdev, "len-redist-region-count", 1); - qdev_prop_set_uint32(gicdev, "redist-region-count[0]", 2); + qdev_prop_set_uint32(gicdev, "redist-region-count[0]", nr_apu_cpus); qdev_prop_set_bit(gicdev, "has-security-extensions", true); sysbus_realize(SYS_BUS_DEVICE(&s->fpd.apu.gic), &error_fatal);