hw/arm/sbsa-ref : small fixes to smmuv3 initialisation
v2 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.
v1->v2
- split into two patches
- previously sent as v1 post split by accident, resending for clarity
- added Reviewed-by
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(-)
--
2.25.1
PATCH v2 1/2 hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
SMMUv3 has an error in a previous patch where an 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
@@ -525,7 +525,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
Re: [PATCH v2 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
Quoted 6 lines · Graeme Gregory
SMMUv3 has an error in a previous patch where an i was transposed to a 1 meaning interrupts would not have been correctly assigned to the SMMUv3 instance.
Fixes 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simplify by moving the gic in the machine state")Signed-off-by Graeme Gregory <[email protected]>
Again, this fix is already in Peter's queue:
https://www.mail-archive.com/[email protected]/msg732819.html
But if you repost, please collect the reviewer tags, so we don't have to review it again. This one has:
Thanks,
Phil.
Quoted 18 lines
--- hw/arm/sbsa-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/sbsa-ref.c +1
-1@@ -525,7 +525,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)); } }
Re: [PATCH v2 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Graeme Gregory
SMMUv3 has an error in a previous patch where an i was transposed to a 1 meaning interrupts would not have been correctly assigned to the SMMUv3 instance.
Fixes 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simplify by moving the gic in the machine state")Signed-off-by Graeme Gregory <[email protected]>
Quoted 8 lines
Again, this fix is already in Peter's queue:
https://www.mail-archive.com/[email protected]/msg732819.htmlBut if you repost, please collect the reviewer tags, so we don't have to review it again. This one has:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Eric Auger <[email protected]>
Ah I thought splitting the patch invalidated Eric's reviewed by?
This is a different fix to the one you are referring to, previous one was in PCIe.
Apologies if I have missed an email from you but I have not received a Reviewed by from you for the SMMUv3 IRQ fix.
Thanks
Graeme
Quoted 22 lines
Thanks,
Phil.
Quoted 18 lines
--- hw/arm/sbsa-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/sbsa-ref.c +1
-1@@ -525,7 +525,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)); } }
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH v2 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
Quoted 18 lines · Graeme Gregory
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Graeme Gregory
SMMUv3 has an error in a previous patch where an i was transposed to a 1 meaning interrupts would not have been correctly assigned to the SMMUv3 instance.
Fixes 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simplify by moving the gic in the machine state")Signed-off-by Graeme Gregory <[email protected]>Quoted 8 lines
Again, this fix is already in Peter's queue:
https://www.mail-archive.com/[email protected]/msg732819.htmlBut if you repost, please collect the reviewer tags, so we don't have to review it again. This one has:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Eric Auger <[email protected]>
Quoted 7 lines
Ah I thought splitting the patch invalidated Eric's reviewed by?
This is a different fix to the one you are referring to, previous one was in PCIe.
Apologies if I have missed an email from you but I have not received a Reviewed by from you for the SMMUv3 IRQ fix.
Oops sorry my bad, I thought this was a repost of the PCIe fix.
So:
Looking at 48ba18e6d3f3 I messed create_smmu() and create_pcie() but you now fixed both cases.
And you are right, this patch isn't reviewed by Eric.
Quoted 28 lines
Thanks
Graeme
Quoted 22 lines
Thanks,
Phil.
Quoted 18 lines
--- hw/arm/sbsa-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/sbsa-ref.c +1
-1@@ -525,7 +525,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)); } }
Re: [PATCH v2 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 18 lines · Graeme Gregory
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Graeme Gregory
SMMUv3 has an error in a previous patch where an i was transposed to a 1 meaning interrupts would not have been correctly assigned to the SMMUv3 instance.
Fixes 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simplify by moving the gic in the machine state")Signed-off-by Graeme Gregory <[email protected]>Quoted 8 lines
Again, this fix is already in Peter's queue:
https://www.mail-archive.com/[email protected]/msg732819.htmlBut if you repost, please collect the reviewer tags, so we don't have to review it again. This one has:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Eric Auger <[email protected]>Quoted 7 lines
Ah I thought splitting the patch invalidated Eric's reviewed by?
This is a different fix to the one you are referring to, previous one was in PCIe.
Apologies if I have missed an email from you but I have not received a Reviewed by from you for the SMMUv3 IRQ fix.
Oops sorry my bad, I thought this was a repost of the PCIe fix.
Quoted 8 lines
So:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Looking at
48ba18e6d3f3I messedcreate_smmu()andcreate_pcie()but you now fixed both cases.And you are right, this patch isn't reviewed by Eric.
Thanks, they are confusingly similar patches.
Graeme
Quoted 28 lines
Quoted 28 lines
Thanks
Graeme
Quoted 22 lines
Thanks,
Phil.
Quoted 18 lines
--- hw/arm/sbsa-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/sbsa-ref.c +1
-1@@ -525,7 +525,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)); } }
PATCH v2 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
@@ -133,6 +133,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 v2 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")Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Previous version also has:
Quoted 18 lines
Signed-off-by Graeme Gregory <[email protected]>--- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+)hw/arm/sbsa-ref.c +1
-0@@ -133,6 +133,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)
Peter Maydell
AppliedQuoted 10 lines · Graeme Gregory
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.
v1->v2
- split into two patches
- previously sent as v1 post split by accident, resending for clarity
- added Reviewed-by
Quoted 6 lines
Graeme Gregory (2):
hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
hw/arm/sbsa-ref : allocate IRQs for SMMUv3hw/arm/sbsa-ref.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to target-arm.next, thanks.
-- PMM