hw/arm/sbsa-ref : small fixes to smmuv3 initialisation
cover hw/arm/sbsa-ref : small fixes to smmuv3 initialisation
Fix two issues with the smmuv3 initialisation, first where a previous patch had transposed an i to a 1. The second an assumption that the IRQs allocated were meant to be unique and not 0 based.
Graeme Gregory (2):
hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
hw/arm/sbsa-ref : allocate IRQs for SMMUv3
hw/arm/sbsa-ref.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
PATCH 1/2 hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
SMMUv3 has an error in previous patch where a i was transposed to a 1 meaning interrupts would not have been correctly assigned to the SMMUv3 instance.
--- hw/arm/sbsa-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/sbsa-ref.c +1 -1
@@ -530,7 +530,7 @@ static void create_smmu(const SBSAMachineState *sms, PCIBus *bus)sysbus_mmio_map (SYS_BUS_DEVICE (dev),0 , base);for (i =0 ; i <NUM_SMMU_IRQS ; i++) {sysbus_connect_irq (SYS_BUS_DEVICE (dev), i, -qdev_get_gpio_in (sms->gic, irq +1 )); +qdev_get_gpio_in (sms->gic, irq + i)); } }
Signature · 1 line
2.25.1
PATCH 2/2 hw/arm/sbsa-ref : allocate IRQs for SMMUv3
In reply to Graeme GregoryOriginal commit did not allocate IRQs for the SMMUv3 in the irqmap effectively using irq 0->3 (shared with other devices). Assuming original intent was to allocate unique IRQs then add an allocation to the irqmap.
--- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+)
hw/arm/sbsa-ref.c +1 -0
@@ -138,6 +138,7 @@ static const int sbsa_ref_irqmap[] = { [SBSA_SECURE_UART_MM] = 9, [SBSA_AHCI] = 10, [SBSA_EHCI] = 11, + [SBSA_SMMU] = 12, /* ... to 15 */ };static uint64_t sbsa_ref_cpu_mp_affinity (SBSAMachineState *sms,int idx)
Signature · 1 line
2.25.1
Re: [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3
Quoted 7 lines · Graeme Gregory
Original commit did not allocate IRQs for the SMMUv3 in the irqmap effectively using irq 0->3 (shared with other devices). Assuming original intent was to allocate unique IRQs then add an allocation to the irqmap.
Fixes e9fdf453240 ("hw/arm: Add arm SBSA reference machine, devices part")Signed-off-by Graeme Gregory <[email protected]>
Quoted 17 lines
--- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+)hw/arm/sbsa-ref.c +1
-0@@ -138,6 +138,7 @@ static const int sbsa_ref_irqmap[] = { [SBSA_SECURE_UART_MM] = 9, [SBSA_AHCI] = 10, [SBSA_EHCI] = 11, + [SBSA_SMMU] = 12, /* ... to 15 */ };static uint64_t sbsa_ref_cpu_mp_affinity (SBSAMachineState *sms,int idx)