From nobody Sat May 4 15:28:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488293110381426.05986830340476; Tue, 28 Feb 2017 06:45:10 -0800 (PST) Received: from localhost ([::1]:33463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cij1W-000189-0f for importer@patchew.org; Tue, 28 Feb 2017 09:45:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciiX2-0000DX-Dt for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciiX1-0005GJ-IP for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50362) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ciiX1-0005Fm-Bv for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:35 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A050F6E796 for ; Tue, 28 Feb 2017 14:13:35 +0000 (UTC) Received: from work.tlv.redhat.com (unknown [10.35.7.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47C9F15A83; Tue, 28 Feb 2017 14:13:34 +0000 (UTC) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 16:13:28 +0200 Message-Id: <1488291209-29430-2-git-send-email-marcel@redhat.com> In-Reply-To: <1488291209-29430-1-git-send-email-marcel@redhat.com> References: <1488291209-29430-1-git-send-email-marcel@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 28 Feb 2017 14:13:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH V4 1/2] acpi: simplify _OSC X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcel@redhat.com, imammedo@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Michael S. Tsirkin" 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 Reviewed-by: Igor Mammedov --- 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 1c928ab..1da6d9f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1803,7 +1803,7 @@ static Aml *build_q35_osc_method(void) Aml *else_ctx; Aml *method; Aml *a_cwd1 =3D aml_name("CDW1"); - Aml *a_ctrl =3D aml_name("CTRL"); + Aml *a_ctrl =3D aml_local(0); =20 method =3D aml_method("_OSC", 4, AML_NOTSERIALIZED); aml_append(method, aml_create_dword_field(aml_arg(3), aml_int(0), "CDW= 1")); @@ -1813,7 +1813,6 @@ static Aml *build_q35_osc_method(void) aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(4), "CDW= 2")); aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(8), "CDW= 3")); =20 - aml_append(if_ctx, aml_store(aml_name("CDW2"), aml_name("SUPP"))); aml_append(if_ctx, aml_store(aml_name("CDW3"), a_ctrl)); =20 /* @@ -1898,8 +1897,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); --=20 2.5.5 From nobody Sat May 4 15:28:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488294152593316.7400820006045; Tue, 28 Feb 2017 07:02:32 -0800 (PST) Received: from localhost ([::1]:33648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cijIJ-0007Ae-65 for importer@patchew.org; Tue, 28 Feb 2017 10:02:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciiX4-0000Fj-CP for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciiX3-0005H1-Gu for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53064) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ciiX3-0005Ge-BO for qemu-devel@nongnu.org; Tue, 28 Feb 2017 09:13:37 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84D3CC04BD3A for ; Tue, 28 Feb 2017 14:13:37 +0000 (UTC) Received: from work.tlv.redhat.com (unknown [10.35.7.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D9AE15A82; Tue, 28 Feb 2017 14:13:35 +0000 (UTC) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 16:13:29 +0200 Message-Id: <1488291209-29430-3-git-send-email-marcel@redhat.com> In-Reply-To: <1488291209-29430-1-git-send-email-marcel@redhat.com> References: <1488291209-29430-1-git-send-email-marcel@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 28 Feb 2017 14:13:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH V4 2/2] hw/pxb-pcie: fix PCI Express hotplug support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcel@redhat.com, imammedo@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add the missing osc method for pxb-pcie devices as APCI spec recommends, see 6.2.9.1 OSC Implementation Example for PCI Host Bridge Devices, ACPI 3.= 0a: It is recommended that a machine with multiple host bridge devices should report the same capabilities for all host bridges, and also negotiate control of the features described in the Control Field in the same way for all host bridges. Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- dtc | 2 +- hw/i386/acpi-build.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dtc b/dtc index ec02b34..65cc4d2 160000 --- a/dtc +++ b/dtc @@ -1 +1 @@ -Subproject commit ec02b34c05be04f249ffaaca4b666f5246877dea +Subproject commit 65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1da6d9f..04029f6 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1961,6 +1961,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(dev, aml_name_decl("_UID", aml_int(bus_num))); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num))); + if (pci_bus_is_express(bus)) { + aml_append(dev, build_q35_osc_method()); + } =20 if (numa_node !=3D NUMA_NODE_UNASSIGNED) { aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node))); --=20 2.5.5