FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-27-2008, 05:15 PM
Mario Limonciello
 
Default UBUNTU: Work around ACPI corruption upon suspend on some Dell machines.

OriginalAuthor: Dennis Noordsij <dennis.noordsij@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@.Dell.com>
Signed-off-by: Tim Gardner <tim.gardner@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


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 04:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org