]> Git Repo - qemu.git/commitdiff
hw/arm/virt-acpi-build: fix MADT generation
authorAndrew Jones <[email protected]>
Mon, 17 Oct 2016 18:22:17 +0000 (19:22 +0100)
committerPeter Maydell <[email protected]>
Mon, 17 Oct 2016 18:22:17 +0000 (19:22 +0100)
We can't return early from build_* functions, as build_header is
only called at the end.

Signed-off-by: Andrew Jones <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Message-id: 1476117341[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/arm/virt-acpi-build.c

index c77525d33a0e9537f8ed88de347ba52f59fca5d7..779d83d83651f5c7cd82304a56c36d1682d0a136 100644 (file)
@@ -554,15 +554,13 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtGuestInfo *guest_info)
         gicr->base_address = cpu_to_le64(memmap[VIRT_GIC_REDIST].base);
         gicr->range_length = cpu_to_le32(memmap[VIRT_GIC_REDIST].size);
 
-        if (!its_class_name()) {
-            return;
+        if (its_class_name()) {
+            gic_its = acpi_data_push(table_data, sizeof *gic_its);
+            gic_its->type = ACPI_APIC_GENERIC_TRANSLATOR;
+            gic_its->length = sizeof(*gic_its);
+            gic_its->translation_id = 0;
+            gic_its->base_address = cpu_to_le64(memmap[VIRT_GIC_ITS].base);
         }
-
-        gic_its = acpi_data_push(table_data, sizeof *gic_its);
-        gic_its->type = ACPI_APIC_GENERIC_TRANSLATOR;
-        gic_its->length = sizeof(*gic_its);
-        gic_its->translation_id = 0;
-        gic_its->base_address = cpu_to_le64(memmap[VIRT_GIC_ITS].base);
     } else {
         gic_msi = acpi_data_push(table_data, sizeof *gic_msi);
         gic_msi->type = ACPI_APIC_GENERIC_MSI_FRAME;
This page took 0.028381 seconds and 4 git commands to generate.