From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6oNi-0000NS-LW for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:42:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6oNh-0004vU-AS for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:42:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6oNh-0004vP-35 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:42:45 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id B777D8E236 for ; Wed, 9 Dec 2015 23:42:44 +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-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB9Ng8Vc005315 for ; Wed, 9 Dec 2015 18:42:44 -0500 From: Igor Mammedov Date: Thu, 10 Dec 2015 00:41:30 +0100 Message-Id: <1449704528-289297-37-git-send-email-imammedo@redhat.com> In-Reply-To: <1449704528-289297-1-git-send-email-imammedo@redhat.com> References: <1449704528-289297-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 36/74] pc: acpi: memhp: move \_GPE._E03 into SSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org in addition remove no longer needed acpi-dsdt-mem-hotplug.dsl. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 6 ++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 16 ---------------- hw/i386/acpi-dsdt.dsl | 5 ----- hw/i386/q35-acpi-dsdt.dsl | 5 ----- include/hw/acpi/memory_hotplug.h | 5 +++++ include/hw/acpi/pc-hotplug.h | 2 -- 6 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 765fccd..94371f7 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1055,6 +1055,12 @@ build_ssdt(GArray *table_data, GArray *linker, build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); + scope = aml_scope("\\_GPE"); + method = aml_method("_E03", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); + aml_append(scope, method); + aml_append(ssdt, scope); + /* Extra PCI root buses are implemented only for i440fx */ bus = find_i440fx(); if (bus) { diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl deleted file mode 100644 index 20c5ec1..0000000 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see . - */ - - External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 8dba096..9cf1b88 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -250,7 +250,6 @@ DefinitionBlock ( #include "hw/acpi/pc-hotplug.h" #define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE #include "acpi-dsdt-cpu-hotplug.dsl" -#include "acpi-dsdt-mem-hotplug.dsl" /**************************************************************** @@ -271,10 +270,6 @@ DefinitionBlock ( // CPU hotplug event \_SB.PRSC() } - Method(_E03) { - // Memory hotplug event - \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 7be7b37..f950f39 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -387,7 +387,6 @@ DefinitionBlock ( #include "hw/acpi/pc-hotplug.h" #define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE #include "acpi-dsdt-cpu-hotplug.dsl" -#include "acpi-dsdt-mem-hotplug.dsl" /**************************************************************** @@ -404,10 +403,6 @@ DefinitionBlock ( // CPU hotplug event \_SB.PRSC() } - Method(_E03) { - // Memory hotplug event - \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h index b6e9f50..de164f2 100644 --- a/include/hw/acpi/memory_hotplug.h +++ b/include/hw/acpi/memory_hotplug.h @@ -47,6 +47,11 @@ extern const VMStateDescription vmstate_memory_hotplug; void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); +#define MEMORY_HOTPLUG_DEVICE MHPD +#define MEMORY_SLOT_SCAN_METHOD MSCN +#define MEMORY_HOTPLUG_HANDLER_PATH "\\_SB.PCI0." \ + stringify(MEMORY_HOTPLUG_DEVICE) "." stringify(MEMORY_SLOT_SCAN_METHOD) + void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, uint16_t io_base, uint16_t io_len); #endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index 77b1569..e5bb321 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -32,7 +32,6 @@ #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -#define MEMORY_HOTPLUG_DEVICE MHPD #define MEMORY_SLOTS_NUMBER MDNR #define MEMORY_HOTPLUG_IO_REGION HPMR #define MEMORY_SLOT_ADDR_LOW MRBL @@ -54,6 +53,5 @@ #define MEMORY_SLOT_PROXIMITY_METHOD MPXM #define MEMORY_SLOT_EJECT_METHOD MEJ0 #define MEMORY_SLOT_NOTIFY_METHOD MTFY -#define MEMORY_SLOT_SCAN_METHOD MSCN #endif -- 1.8.3.1