All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/arm/sbsa-ref : small fixes to smmuv3 initialisation
@ 2020-09-29  9:42 Graeme Gregory
  2020-09-29  9:42 ` [PATCH 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation Graeme Gregory
  2020-09-29  9:42 ` [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3 Graeme Gregory
  0 siblings, 2 replies; 4+ messages in thread
From: Graeme Gregory @ 2020-09-29  9:42 UTC (permalink / raw)
  To: qemu-arm
  Cc: Graeme Gregory, peter.maydell, jamie, rad, qemu-stable,
	qemu-devel, leif, f4bug

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(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
  2020-09-29  9:42 [PATCH 0/2] hw/arm/sbsa-ref : small fixes to smmuv3 initialisation Graeme Gregory
@ 2020-09-29  9:42 ` Graeme Gregory
  2020-09-29  9:42 ` [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3 Graeme Gregory
  1 sibling, 0 replies; 4+ messages in thread
From: Graeme Gregory @ 2020-09-29  9:42 UTC (permalink / raw)
  To: qemu-arm
  Cc: Graeme Gregory, peter.maydell, jamie, rad, qemu-stable,
	qemu-devel, leif, f4bug

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.

Fixes: 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simplify by moving the gic in the machine state")
Signed-off-by: Graeme Gregory <graeme@nuviainc.com>
---
 hw/arm/sbsa-ref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 257ada9425..47e83252c1 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -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));
     }
 }
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3
  2020-09-29  9:42 [PATCH 0/2] hw/arm/sbsa-ref : small fixes to smmuv3 initialisation Graeme Gregory
  2020-09-29  9:42 ` [PATCH 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation Graeme Gregory
@ 2020-09-29  9:42 ` Graeme Gregory
  2020-09-29  9:51   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Graeme Gregory @ 2020-09-29  9:42 UTC (permalink / raw)
  To: qemu-arm
  Cc: Graeme Gregory, peter.maydell, jamie, rad, qemu-stable,
	qemu-devel, leif, f4bug

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 <graeme@nuviainc.com>
---
 hw/arm/sbsa-ref.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 47e83252c1..9109fb58be 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -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)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3
  2020-09-29  9:42 ` [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3 Graeme Gregory
@ 2020-09-29  9:51   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29  9:51 UTC (permalink / raw)
  To: Graeme Gregory, qemu-arm
  Cc: peter.maydell, jamie, rad, qemu-stable, qemu-devel, leif

On 9/29/20 11:42 AM, Graeme Gregory wrote:
> 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 <graeme@nuviainc.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/arm/sbsa-ref.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 47e83252c1..9109fb58be 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -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)
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-29  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  9:42 [PATCH 0/2] hw/arm/sbsa-ref : small fixes to smmuv3 initialisation Graeme Gregory
2020-09-29  9:42 ` [PATCH 1/2] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation Graeme Gregory
2020-09-29  9:42 ` [PATCH 2/2] hw/arm/sbsa-ref : allocate IRQs for SMMUv3 Graeme Gregory
2020-09-29  9:51   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.