Skip to content

Commit

Permalink
pc: acpi: cpuhp: move \_GPE._E02() into SSDT
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Igor Mammedov authored and mstsirkin committed Jan 9, 2016
1 parent f294ecb commit 6b30608
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 46 deletions.
2 changes: 1 addition & 1 deletion hw/acpi/cpu_hotplug_acpi_table.c
Expand Up @@ -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);
Expand Down
12 changes: 9 additions & 3 deletions hw/i386/acpi-build.c
Expand Up @@ -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;
Expand Down
23 changes: 0 additions & 23 deletions hw/i386/acpi-dsdt-cpu-hotplug.dsl

This file was deleted.

9 changes: 0 additions & 9 deletions hw/i386/acpi-dsdt.dsl
Expand Up @@ -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
****************************************************************/
Expand All @@ -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) {
Expand Down
9 changes: 0 additions & 9 deletions hw/i386/q35-acpi-dsdt.dsl
Expand Up @@ -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
****************************************************************/
Expand All @@ -399,10 +394,6 @@ DefinitionBlock (
}
Method(_L01) {
}
Method(_E02) {
// CPU hotplug event
\_SB.CPU_SCAN_METHOD()
}
Method(_L04) {
}
Method(_L05) {
Expand Down
1 change: 1 addition & 0 deletions include/hw/acpi/cpu_hotplug.h
Expand Up @@ -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
1 change: 0 additions & 1 deletion include/hw/acpi/pc-hotplug.h
Expand Up @@ -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
Expand Down

0 comments on commit 6b30608

Please sign in to comment.