diff mbox series

[v1,3/4] hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio

Message ID 20181129163655.20370-4-edgar.iglesias@gmail.com (mailing list archive)
State New, archived
Headers show
Series hw/arm: versal: Correct number of IRQs in GIC setup | expand

Commit Message

Edgar E. Iglesias Nov. 29, 2018, 4:36 p.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Use IRQs 111 - 118 for virtio-mmio. The interrupts we're currently
using 160+ are not available in the Versal GIC.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/arm/xlnx-versal-virt.c    | 4 ++--
 include/hw/arm/xlnx-versal.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Alistair Francis Nov. 30, 2018, 5:38 p.m. UTC | #1
On Thu, Nov 29, 2018 at 8:39 AM Edgar E. Iglesias
<edgar.iglesias@gmail.com> wrote:
>
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Use IRQs 111 - 118 for virtio-mmio. The interrupts we're currently
> using 160+ are not available in the Versal GIC.
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/arm/xlnx-versal-virt.c    | 4 ++--
>  include/hw/arm/xlnx-versal.h | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
> index 2ed6ee9934..c6feeac532 100644
> --- a/hw/arm/xlnx-versal-virt.c
> +++ b/hw/arm/xlnx-versal-virt.c
> @@ -351,7 +351,7 @@ static void create_virtio_regions(VersalVirt *s)
>      for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {
>          char *name = g_strdup_printf("virtio%d", i);;
>          hwaddr base = MM_TOP_RSVD + i * virtio_mmio_size;
> -        int irq = VERSAL_RSVD_HIGH_IRQ_FIRST + i;
> +        int irq = VERSAL_RSVD_IRQ_FIRST + i;
>          MemoryRegion *mr;
>          DeviceState *dev;
>          qemu_irq pic_irq;
> @@ -368,7 +368,7 @@ static void create_virtio_regions(VersalVirt *s)
>
>      for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {
>          hwaddr base = MM_TOP_RSVD + i * virtio_mmio_size;
> -        int irq = VERSAL_RSVD_HIGH_IRQ_FIRST + i;
> +        int irq = VERSAL_RSVD_IRQ_FIRST + i;
>          char *name = g_strdup_printf("/virtio_mmio@%" PRIx64, base);
>
>          qemu_fdt_add_subnode(s->fdt, name);
> diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h
> index 9da621e4b6..76fb9de391 100644
> --- a/include/hw/arm/xlnx-versal.h
> +++ b/include/hw/arm/xlnx-versal.h
> @@ -75,9 +75,9 @@ typedef struct Versal {
>  #define VERSAL_GEM1_IRQ_0          58
>  #define VERSAL_GEM1_WAKE_IRQ_0     59
>
> -/* Architecturally eserved IRQs suitable for virtualization.  */
> -#define VERSAL_RSVD_HIGH_IRQ_FIRST 160
> -#define VERSAL_RSVD_HIGH_IRQ_LAST  255
> +/* Architecturally reserved IRQs suitable for virtualization.  */
> +#define VERSAL_RSVD_IRQ_FIRST 111
> +#define VERSAL_RSVD_IRQ_LAST  118
>
>  #define MM_TOP_RSVD                 0xa0000000U
>  #define MM_TOP_RSVD_SIZE            0x4000000
> --
> 2.17.1
>
>
diff mbox series

Patch

diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 2ed6ee9934..c6feeac532 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -351,7 +351,7 @@  static void create_virtio_regions(VersalVirt *s)
     for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {
         char *name = g_strdup_printf("virtio%d", i);;
         hwaddr base = MM_TOP_RSVD + i * virtio_mmio_size;
-        int irq = VERSAL_RSVD_HIGH_IRQ_FIRST + i;
+        int irq = VERSAL_RSVD_IRQ_FIRST + i;
         MemoryRegion *mr;
         DeviceState *dev;
         qemu_irq pic_irq;
@@ -368,7 +368,7 @@  static void create_virtio_regions(VersalVirt *s)
 
     for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {
         hwaddr base = MM_TOP_RSVD + i * virtio_mmio_size;
-        int irq = VERSAL_RSVD_HIGH_IRQ_FIRST + i;
+        int irq = VERSAL_RSVD_IRQ_FIRST + i;
         char *name = g_strdup_printf("/virtio_mmio@%" PRIx64, base);
 
         qemu_fdt_add_subnode(s->fdt, name);
diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h
index 9da621e4b6..76fb9de391 100644
--- a/include/hw/arm/xlnx-versal.h
+++ b/include/hw/arm/xlnx-versal.h
@@ -75,9 +75,9 @@  typedef struct Versal {
 #define VERSAL_GEM1_IRQ_0          58
 #define VERSAL_GEM1_WAKE_IRQ_0     59
 
-/* Architecturally eserved IRQs suitable for virtualization.  */
-#define VERSAL_RSVD_HIGH_IRQ_FIRST 160
-#define VERSAL_RSVD_HIGH_IRQ_LAST  255
+/* Architecturally reserved IRQs suitable for virtualization.  */
+#define VERSAL_RSVD_IRQ_FIRST 111
+#define VERSAL_RSVD_IRQ_LAST  118
 
 #define MM_TOP_RSVD                 0xa0000000U
 #define MM_TOP_RSVD_SIZE            0x4000000