From patchwork Fri Jan 8 14:19:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 564867 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 A3B931402A0 for ; Sat, 9 Jan 2016 01:32:36 +1100 (AEDT) Received: from localhost ([::1]:36562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHY5i-000510-Be for incoming@patchwork.ozlabs.org; Fri, 08 Jan 2016 09:32:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHXtO-0004y8-3e for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:19:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHXtJ-0002wZ-81 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:19:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHXtJ-0002wQ-1I for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:19:45 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id B7121C0B932C; Fri, 8 Jan 2016 14:19:44 +0000 (UTC) Received: from redhat.com (vpn1-6-178.ams2.redhat.com [10.36.6.178]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u08EJfXK010423; Fri, 8 Jan 2016 09:19:42 -0500 Date: Fri, 8 Jan 2016 16:19:41 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1452262668-31244-24-git-send-email-mst@redhat.com> References: <1452262668-31244-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1452262668-31244-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Igor Mammedov Subject: [Qemu-devel] [PULL 23/59] pc: acpi: cpuhp: move \_GPE._E02() 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 From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/cpu_hotplug.h | 1 + include/hw/acpi/pc-hotplug.h | 1 - hw/acpi/cpu_hotplug_acpi_table.c | 2 +- hw/i386/acpi-build.c | 12 +++++++++--- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 23 ----------------------- hw/i386/acpi-dsdt.dsl | 9 --------- hw/i386/q35-acpi-dsdt.dsl | 9 --------- 7 files changed, 11 insertions(+), 46 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-cpu-hotplug.dsl diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 255e70c..f22640e 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -32,6 +32,7 @@ void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, #define CPU_ON_BITMAP "CPON" #define CPU_STATUS_METHOD "CPST" #define CPU_STATUS_MAP "PRS" +#define CPU_SCAN_METHOD "PRSC" void build_cpu_hotplug_aml(Aml *ctx); #endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index 6522745..6a8d268 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -28,7 +28,6 @@ #define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8 #define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00 #define CPU_HOTPLUG_RESOURCE_DEVICE PRES -#define CPU_SCAN_METHOD PRSC #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 8dda4f4..13b210e 100644 --- a/hw/acpi/cpu_hotplug_acpi_table.c +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -71,7 +71,7 @@ void build_cpu_hotplug_aml(Aml *ctx) aml_append(method, aml_sleep(200)); aml_append(sb_scope, method); - method = aml_method(stringify(CPU_SCAN_METHOD), 0, AML_NOTSERIALIZED); + method = aml_method(CPU_SCAN_METHOD, 0, AML_NOTSERIALIZED); { Aml *while_ctx, *if_ctx2, *else_ctx2; Aml *bus_check_evt = aml_int(1); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 6c5d09a..9f1ead3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1085,9 +1085,15 @@ build_ssdt(GArray *table_data, GArray *linker, 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); + { + method = aml_method("_E02", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); + aml_append(scope, method); + + method = aml_method("_E03", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); + aml_append(scope, method); + } aml_append(ssdt, scope); bus = PC_MACHINE(machine)->bus; diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl deleted file mode 100644 index 88c472b..0000000 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ /dev/null @@ -1,23 +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 . - */ - -/**************************************************************** - * CPU hotplug - ****************************************************************/ - -Scope(\_SB) { - /* Objects filled in by run-time generated SSDT */ - External(CPU_SCAN_METHOD, MethodObj) -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 6a0c656..007d3c9 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -247,11 +247,6 @@ DefinitionBlock ( } } -#include "hw/acpi/pc-hotplug.h" -#define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE -#include "acpi-dsdt-cpu-hotplug.dsl" - - /**************************************************************** * General purpose events ****************************************************************/ @@ -266,10 +261,6 @@ DefinitionBlock ( \_SB.PCI0.PCNT() Release(\_SB.PCI0.BLCK) } - Method(_E02) { - // CPU hotplug event - \_SB.CPU_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 7211665..0511e26 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -384,11 +384,6 @@ DefinitionBlock ( define_gsi_link(GSIH, 0, 0x17) } -#include "hw/acpi/pc-hotplug.h" -#define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE -#include "acpi-dsdt-cpu-hotplug.dsl" - - /**************************************************************** * General purpose events ****************************************************************/ @@ -399,10 +394,6 @@ DefinitionBlock ( } Method(_L01) { } - Method(_E02) { - // CPU hotplug event - \_SB.CPU_SCAN_METHOD() - } Method(_L04) { } Method(_L05) {