From: Andrew Jones <drjones@redhat.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, eric.auger@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] hw/arm/virt-acpi-build: fix MADT generation
Date: Mon, 10 Oct 2016 18:35:40 +0200 [thread overview]
Message-ID: <1476117341-32690-2-git-send-email-drjones@redhat.com> (raw)
In-Reply-To: <1476117341-32690-1-git-send-email-drjones@redhat.com>
We can't return early from build_* functions, as build_header is
only called at the end.
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
hw/arm/virt-acpi-build.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 7b39b1d2d676..c31349561c95 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -556,15 +556,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;
--
2.7.4
next prev parent reply other threads:[~2016-10-10 16:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 16:35 [Qemu-devel] [PATCH 0/2] couple ITS support fixups Andrew Jones
2016-10-10 16:35 ` Andrew Jones [this message]
2016-10-10 18:54 ` [Qemu-devel] [PATCH 1/2] hw/arm/virt-acpi-build: fix MADT generation Auger Eric
2016-10-10 16:35 ` [Qemu-devel] [PATCH 2/2] hw/arm/virt: no ITS on older machine types Andrew Jones
2016-10-10 19:37 ` Auger Eric
2017-01-20 15:52 ` Peter Maydell
2017-01-26 7:58 ` Auger Eric
2017-01-26 10:41 ` Peter Maydell
2017-01-26 13:34 ` Auger Eric
2016-10-12 12:27 ` [Qemu-devel] [PATCH 0/2] couple ITS support fixups Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476117341-32690-2-git-send-email-drjones@redhat.com \
--to=drjones@redhat.com \
--cc=eric.auger@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).