[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/15] acpi: simplify _OSC
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 13/15] acpi: simplify _OSC |
Date: |
Thu, 2 Mar 2017 08:20:51 +0200 |
Our _OSC method has a bunch of unused code loading data
into external CTRL and SUPP fields which are then never
used. Drop this in favor of a single local variable.
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
---
hw/i386/acpi-build.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index db04cf5..efbbfcb 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1804,7 +1804,7 @@ static Aml *build_q35_osc_method(void)
Aml *else_ctx;
Aml *method;
Aml *a_cwd1 = aml_name("CDW1");
- Aml *a_ctrl = aml_name("CTRL");
+ Aml *a_ctrl = aml_local(0);
method = aml_method("_OSC", 4, AML_NOTSERIALIZED);
aml_append(method, aml_create_dword_field(aml_arg(3), aml_int(0), "CDW1"));
@@ -1814,7 +1814,6 @@ static Aml *build_q35_osc_method(void)
aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(4), "CDW2"));
aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(8), "CDW3"));
- aml_append(if_ctx, aml_store(aml_name("CDW2"), aml_name("SUPP")));
aml_append(if_ctx, aml_store(aml_name("CDW3"), a_ctrl));
/*
@@ -1899,8 +1898,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03")));
aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
aml_append(dev, aml_name_decl("_UID", aml_int(1)));
- aml_append(dev, aml_name_decl("SUPP", aml_int(0)));
- aml_append(dev, aml_name_decl("CTRL", aml_int(0)));
aml_append(dev, build_q35_osc_method());
aml_append(sb_scope, dev);
aml_append(dsdt, sb_scope);
--
MST
- Re: [Qemu-devel] [PULL 05/15] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands, (continued)
- [Qemu-devel] [PULL 04/15] ACPI: Add Virtual Machine Generation ID support, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 07/15] MAINTAINERS: Add VM Generation ID entries, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 06/15] tests: Move reusable ACPI code into a utility file, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 08/15] virtio: check for vring setup in virtio_queue_empty, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 10/15] virtio: invalidate memory in vring_set_avail_event(), Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 09/15] virtio: guard vring access when setting notification, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 11/15] virtio: add missing region cache init in virtio_load(), Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 12/15] virtio: unbreak virtio-pci with IOMMU after caching ring translations, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 14/15] tests/acpi: update DSDT after last patch, Michael S. Tsirkin, 2017/03/02
- [Qemu-devel] [PULL 13/15] acpi: simplify _OSC,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 15/15] hw/pxb-pcie: fix PCI Express hotplug support, Michael S. Tsirkin, 2017/03/02
- Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features, Peter Maydell, 2017/03/02
- Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features, Peter Maydell, 2017/03/03
- Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features, Peter Maydell, 2017/03/03