From: Kevin Tian Date: Wed, 19 Oct 2011 08:51:51 +0000 (+0800) Subject: ACPI: processor: cache acpi_power_register in cx structure X-Git-Tag: v2.6.39-400.9.0~830^2~1^2~5 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fb4b2889370fc13d762272a50409a128a4963d60;p=users%2Fjedix%2Flinux-maple.git ACPI: processor: cache acpi_power_register in cx structure This patch save acpi_power_register in cx structure because we need pass this to the Xen ACPI processor driver. Signed-off-by: Yu Ke Signed-off-by: Tian Kevin Signed-off-by: Tang Liang Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index bf4e6719968c..f5250b2092af 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -427,7 +427,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) if (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO && (reg->space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) continue; - + memcpy(&(cx.reg), reg, sizeof(*reg)); /* There should be an easy way to extract an integer... */ obj = &(element->package.elements[1]); if (obj->type != ACPI_TYPE_INTEGER) diff --git a/include/acpi/processor.h b/include/acpi/processor.h index e79831a328fc..94b10a14aafb 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -65,6 +65,7 @@ struct acpi_processor_cx { u64 time; u8 bm_sts_skip; char desc[ACPI_CX_DESC_LEN]; + struct acpi_power_register reg; }; struct acpi_processor_power {