From patchwork Mon Dec 28 17:02:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 561332 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 32D17140C59 for ; Tue, 29 Dec 2015 04:08:40 +1100 (AEDT) Received: from localhost ([::1]:45332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDbHh-0002x0-TD for incoming@patchwork.ozlabs.org; Mon, 28 Dec 2015 12:08:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDbCP-0008LT-JF for qemu-devel@nongnu.org; Mon, 28 Dec 2015 12:03:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDbCO-00080k-QN for qemu-devel@nongnu.org; Mon, 28 Dec 2015 12:03:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDbCO-00080Z-Lx for qemu-devel@nongnu.org; Mon, 28 Dec 2015 12:03:08 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4E522E706B for ; Mon, 28 Dec 2015 17:03:08 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBSH2wJ1021909 for ; Mon, 28 Dec 2015 12:03:07 -0500 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Mon, 28 Dec 2015 18:02:18 +0100 Message-Id: <1451322178-261185-11-git-send-email-imammedo@redhat.com> In-Reply-To: <1451321851-260744-1-git-send-email-imammedo@redhat.com> References: <1451321851-260744-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device into SSDT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org move remnants of MHPD device from DSDT into SSDT. i.e. Device(MHPD), _UID, _HID Signed-off-by: Igor Mammedov --- hw/acpi/memory_hotplug_acpi_table.c | 6 +++++- hw/i386/acpi-dsdt-mem-hotplug.dsl | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 2428e84..83e739c 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -24,7 +24,7 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, /* scope for memory hotplug controller device node */ pci_scope = aml_scope("_SB.PCI0"); - mem_ctrl_dev = aml_scope(stringify(MEMORY_HOTPLUG_DEVICE)); + mem_ctrl_dev = aml_device(stringify(MEMORY_HOTPLUG_DEVICE)); { Aml *one = aml_int(1); Aml *zero = aml_int(0); @@ -34,6 +34,10 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, Aml *ctrl_lock = aml_name(stringify(MEMORY_SLOT_LOCK)); Aml *slot_selector = aml_name(stringify(MEMORY_SLOT_SLECTOR)); + aml_append(mem_ctrl_dev, aml_name_decl("_HID", aml_string("PNP0A06"))); + aml_append(mem_ctrl_dev, + aml_name_decl("_UID", aml_string("Memory hotplug resources"))); + method = aml_method("_STA", 0, AML_NOTSERIALIZED); ifctx = aml_if(aml_equal(slots_nr, zero)); { diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 50b7541..20c5ec1 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -14,10 +14,3 @@ */ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) - - Scope(\_SB.PCI0) { - Device(MEMORY_HOTPLUG_DEVICE) { - Name(_HID, "PNP0A06") - Name(_UID, "Memory hotplug resources") - } // Device() - } // Scope()