ACPICA release 20110623 linuxized patches
Subsystems (2)
Hi, Len
The linuxized patches for ACPICA release 20110623 attached.
[PATCH 1/3] ACPICA: Add option to disable method return value validation [PATCH 2/3] ACPICA: Do not repair _TSS return package if _PSS is present [PATCH 3/3] ACPICA: Update to version 20110623
And would you please also apply the release 20110527 linuxized patches?
http://marc.info/?l=linux-acpi&m=130802022413556&w=2
Thanks,
Lin Ming
Quoted 1 line
From
13795b46b878be5a7186b415fb0fc0524b4d9b7eMon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Mon, 4 Jul 2011 08:24:03 +0000
Subject: [PATCH 1/3] ACPICA: Add option to disable method return value validation
and repair
Runtime option can be used to disable return value repair if this is causing a problem on a particular machine.
--- drivers/acpi/acpica/acglobal.h | 6 ++++++ drivers/acpi/acpica/nspredef.c | 18 ++++++++++++------ include/acpi/acpixf.h | 1 + 3 files changed, 19 insertions(+), 6 deletions(-)
drivers/acpi/acpica/acglobal.h +6 -0
@@ -126,6 +126,12 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);*/ u8 ACPI_INIT_GLOBAL (acpi_gbl_truncate_io_addresses ,FALSE ); +/* +* Disable runtime checking and repair of values returned by control methods. +* Use only if the repair is causing a problem on a particular machine. +*/ +u8 ACPI_INIT_GLOBAL (acpi_gbl_disable_auto_repair ,FALSE ); +/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ struct acpi_table_fadt acpi_gbl_FADT;
drivers/acpi/acpica/nspredef.c +12 -6
@@ -193,14 +193,20 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, }/* -* 1) We have a return value, but if one wasn't expected, just exit, this is -* not a problem. For example, if the "Implicit Return" feature is -* enabled, methods will always return a value. +* Return value validation and possible repair. * -* 2) If the return value can be of any type, then we cannot perform any -* validation, exit. +* 1) Don't perform return value validation/repair if this feature +* has been disabled via a global option. +* +* 2) We have a return value, but if one wasn't expected, just exit, +* this is not a problem. For example, if the "Implicit Return" +* feature is enabled, methods will always return a value. +* +* 3) If the return value can be of any type, then we cannot perform +* any validation, just exit. */ -if ((!predefined->info.expected_btypes) || +if (acpi_gbl_disable_auto_repair || + (!predefined->info.expected_btypes) || (predefined->info.expected_btypes ==ACPI_RTYPE_ALL )) { goto cleanup; }
include/acpi/acpixf.h +1 -0
@@ -69,6 +69,7 @@ extern u32 acpi_gbl_trace_flags;extern u32 acpi_gbl_enable_aml_debug_object;extern u8 acpi_gbl_copy_dsdt_locally;extern u8 acpi_gbl_truncate_io_addresses; +extern u8 acpi_gbl_disable_auto_repair;extern u32 acpi_current_gpe_count;extern struct acpi_table_fadt acpi_gbl_FADT;
Quoted 1 line
From
f3725b72cf480d149988dd2e42c166727433bc32Mon Sep 17 00:00:00 2001
From: Fenghua Yu <[email protected]>
Date: Mon, 4 Jul 2011 08:36:16 +0000
Subject: [PATCH 2/3] ACPICA: Do not repair _TSS return package if _PSS is present
We can only sort the _TSS return package if there is no _PSS in the same scope. This is because if _PSS is present, the ACPI specification dictates that the _TSS Power Dissipation field is to be ignored, and therefore some BIOSs leave garbage values in the _TSS Power field(s). In this case, it is best to just return the _TSS package as-is.
--- drivers/acpi/acpica/aclocal.h | 1 + drivers/acpi/acpica/nspredef.c | 1 + drivers/acpi/acpica/nsrepair2.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 0 deletions(-)
drivers/acpi/acpica/aclocal.h +1 -0
@@ -357,6 +357,7 @@ struct acpi_predefined_data {char *pathname;const union acpi_predefined_info *predefined;union acpi_operand_object *parent_package; +struct acpi_namespace_node *node;u32 flags;u8 node_flags; };
drivers/acpi/acpica/nspredef.c +1 -0
@@ -218,6 +218,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, goto cleanup; } data->predefined = predefined; + data->node = node; data->node_flags = node->flags; data->pathname = pathname;
drivers/acpi/acpica/nsrepair2.c +15 -0
@@ -503,6 +503,21 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data, {union acpi_operand_object *return_object = *return_object_ptr;acpi_status status; +struct acpi_namespace_node *node; + +/* +* We can only sort the _TSS return package if there is no _PSS in the +* same scope. This is because if _PSS is present, the ACPI specification +* dictates that the _TSS Power Dissipation field is to be ignored, and +* therefore some BIOSs leave garbage values in the _TSS Power field(s). +* In this case, it is best to just return the _TSS package as-is. +* (May, 2011) +*/ + status = +acpi_ns_get_node (data->node,"^_PSS" ,ACPI_NS_NO_UPSEARCH , &node); +if (ACPI_SUCCESS (status)) { +return (AE_OK ); + } status = acpi_ns_check_sorted_list(data, return_object, 5, 1, ACPI_SORT_DESCENDING,
Quoted 1 line
From
2764edd174a99e8acb8120aa226432537bf58d24Mon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Mon, 4 Jul 2011 08:38:51 +0000
Subject: [PATCH 3/3] ACPICA: Update to version 20110623
Version 20110623.
--- include/acpi/acpixf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20110527 +#define ACPI_CA_VERSION 0x20110623#include "actypes.h" #include "actbl.h"
applied
thanks,
Len Brown, Intel Open Source Technology Center