SRU: Bug #183033 - Intel Core 2 Duo - Resume from suspend, CPU Frequency Scaling is gone on CPU1

Tim Gardner timg at tpi.com
Thu May 29 20:45:35 UTC 2008


>From 7e204fbe692d575f90b551c1426fac7e4d35be64 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <supermario at mlimonciello.(none)>
Date: Tue, 27 May 2008 12:15:56 -0500
Subject: [PATCH] UBUNTU: Work around ACPI corruption upon suspend on some Dell machines.

OriginalAuthor: Dennis Noordsij <dennis.noordsij at helsinki.fi>
OriginalLocation: http://bugzilla.kernel.org/attachment.cgi?id=16280&action=view
Bug: #183033
Ignore: no

Allocate ACPI descriptors instead of mapping ACPI memory.
This will resolve issues with CPU frequency scaling going out of wack upon
suspend and resume.

Signed-off-by: Mario Limonciello <Mario_Limonciello at .Dell.com>
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 drivers/acpi/executer/exconfig.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 25802f3..2599b48 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -268,6 +268,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 	struct acpi_table_desc table_desc;
 	acpi_native_uint table_index;
 	acpi_status status;
+	u32 length;
+	void *maddr;
 
 	ACPI_FUNCTION_TRACE(ex_load_op);
 
@@ -299,9 +301,24 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 			}
 		}
 
+ 		length = obj_desc->region.length;
+ 		table_desc.pointer = ACPI_ALLOCATE(length);
+ 		if (!table_desc.pointer) {
+ 			return_ACPI_STATUS(AE_NO_MEMORY);
+ 		}
+
+ 		maddr = acpi_os_map_memory(obj_desc->region.address, length);
+ 		if (!maddr) {
+ 			ACPI_FREE(table_desc.pointer);
+ 			return_ACPI_STATUS(AE_NO_MEMORY);
+ 		}
+ 		ACPI_MEMCPY(table_desc.pointer, maddr, length);
+ 		acpi_os_unmap_memory(maddr, length);
+
+ 		/* Keep the address for the pretty table info print */
 		table_desc.address = obj_desc->region.address;
 		table_desc.length = obj_desc->region.length;
-		table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
+		table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
 		break;
 
 	case ACPI_TYPE_BUFFER:	/* Buffer or resolved region_field */
-- 
1.5.4.3





More information about the kernel-team mailing list