Commit 3a58176e authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPICA: Remove messages if predefined repair(s) are successful

Repair mechanism was considered too wordy. Now, messages are only
unconditionally emitted if the return object cannot be repaired.
Existing messages for successful repairs were converted to
ACPI_DEBUG_PRINT messages for now. ACPICA BZ 827.

http://www.acpica.org/bugzilla/show_bug.cgi?id=827Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent ea7c5ec1
...@@ -462,10 +462,10 @@ acpi_ns_check_package(struct acpi_predefined_data *data, ...@@ -462,10 +462,10 @@ acpi_ns_check_package(struct acpi_predefined_data *data,
if (count < expected_count) { if (count < expected_count) {
goto package_too_small; goto package_too_small;
} else if (count > expected_count) { } else if (count > expected_count) {
ACPI_WARN_PREDEFINED((AE_INFO, data->pathname, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
data->node_flags, "%s: Return Package is larger than needed - "
"Return Package is larger than needed - " "found %u, expected %u\n",
"found %u, expected %u", count, data->pathname, count,
expected_count)); expected_count));
} }
......
...@@ -118,6 +118,8 @@ acpi_ns_repair_object(struct acpi_predefined_data *data, ...@@ -118,6 +118,8 @@ acpi_ns_repair_object(struct acpi_predefined_data *data,
union acpi_operand_object *new_object; union acpi_operand_object *new_object;
acpi_status status; acpi_status status;
ACPI_FUNCTION_NAME(ns_repair_object);
/* /*
* At this point, we know that the type of the returned object was not * At this point, we know that the type of the returned object was not
* one of the expected types for this predefined name. Attempt to * one of the expected types for this predefined name. Attempt to
...@@ -171,19 +173,18 @@ acpi_ns_repair_object(struct acpi_predefined_data *data, ...@@ -171,19 +173,18 @@ acpi_ns_repair_object(struct acpi_predefined_data *data,
return_object->common.reference_count--; return_object->common.reference_count--;
} }
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
"Converted %s to expected %s at index %u", "%s: Converted %s to expected %s at index %u\n",
acpi_ut_get_object_type_name data->pathname,
(return_object), acpi_ut_get_object_type_name(return_object),
acpi_ut_get_object_type_name(new_object), acpi_ut_get_object_type_name(new_object),
package_index)); package_index));
} else { } else {
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
"Converted %s to expected %s", "%s: Converted %s to expected %s\n",
acpi_ut_get_object_type_name data->pathname,
(return_object), acpi_ut_get_object_type_name(return_object),
acpi_ut_get_object_type_name acpi_ut_get_object_type_name(new_object)));
(new_object)));
} }
/* Delete old object, install the new return object */ /* Delete old object, install the new return object */
...@@ -528,6 +529,8 @@ acpi_ns_repair_package_list(struct acpi_predefined_data *data, ...@@ -528,6 +529,8 @@ acpi_ns_repair_package_list(struct acpi_predefined_data *data,
{ {
union acpi_operand_object *pkg_obj_desc; union acpi_operand_object *pkg_obj_desc;
ACPI_FUNCTION_NAME(ns_repair_package_list);
/* /*
* Create the new outer package and populate it. The new package will * Create the new outer package and populate it. The new package will
* have a single element, the lone subpackage. * have a single element, the lone subpackage.
...@@ -544,8 +547,9 @@ acpi_ns_repair_package_list(struct acpi_predefined_data *data, ...@@ -544,8 +547,9 @@ acpi_ns_repair_package_list(struct acpi_predefined_data *data,
*obj_desc_ptr = pkg_obj_desc; *obj_desc_ptr = pkg_obj_desc;
data->flags |= ACPI_OBJECT_REPAIRED; data->flags |= ACPI_OBJECT_REPAIRED;
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
"Repaired Incorrectly formed Package")); "%s: Repaired incorrectly formed Package\n",
data->pathname));
return (AE_OK); return (AE_OK);
} }
...@@ -255,6 +255,8 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, ...@@ -255,6 +255,8 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data,
u32 *dword_buffer; u32 *dword_buffer;
u32 i; u32 i;
ACPI_FUNCTION_NAME(ns_repair_FDE);
switch (return_object->common.type) { switch (return_object->common.type) {
case ACPI_TYPE_BUFFER: case ACPI_TYPE_BUFFER:
...@@ -296,8 +298,9 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, ...@@ -296,8 +298,9 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data,
byte_buffer++; byte_buffer++;
} }
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
"Expanded Byte Buffer to expected DWord Buffer")); "%s Expanded Byte Buffer to expected DWord Buffer\n",
data->pathname));
break; break;
default: default:
...@@ -445,6 +448,8 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data, ...@@ -445,6 +448,8 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
u32 previous_value; u32 previous_value;
acpi_status status; acpi_status status;
ACPI_FUNCTION_NAME(ns_check_sorted_list);
/* The top-level object must be a package */ /* The top-level object must be a package */
if (return_object->common.type != ACPI_TYPE_PACKAGE) { if (return_object->common.type != ACPI_TYPE_PACKAGE) {
...@@ -460,8 +465,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data, ...@@ -460,8 +465,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
*/ */
status = acpi_ns_remove_null_elements(return_object); status = acpi_ns_remove_null_elements(return_object);
if (status == AE_NULL_ENTRY) { if (status == AE_NULL_ENTRY) {
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, data->node_flags, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
"NULL elements removed from package")); "%s: NULL elements removed from package\n",
data->pathname));
/* Exit if package is now zero length */ /* Exit if package is now zero length */
...@@ -522,10 +528,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data, ...@@ -522,10 +528,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
data->flags |= ACPI_OBJECT_REPAIRED; data->flags |= ACPI_OBJECT_REPAIRED;
ACPI_INFO_PREDEFINED((AE_INFO, data->pathname, ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
data->node_flags, "%s: Repaired unsorted list - now sorted by %s\n",
"Repaired unsorted list - now sorted by %s", data->pathname, sort_key_name));
sort_key_name));
return (AE_OK); return (AE_OK);
} }
......
...@@ -85,7 +85,8 @@ ...@@ -85,7 +85,8 @@
#define ACPI_LV_INIT 0x00000001 #define ACPI_LV_INIT 0x00000001
#define ACPI_LV_DEBUG_OBJECT 0x00000002 #define ACPI_LV_DEBUG_OBJECT 0x00000002
#define ACPI_LV_INFO 0x00000004 #define ACPI_LV_INFO 0x00000004
#define ACPI_LV_ALL_EXCEPTIONS 0x00000007 #define ACPI_LV_REPAIR 0x00000008
#define ACPI_LV_ALL_EXCEPTIONS 0x0000000F
/* Trace verbosity level 1 [Standard Trace Level] */ /* Trace verbosity level 1 [Standard Trace Level] */
...@@ -143,6 +144,7 @@ ...@@ -143,6 +144,7 @@
#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
#define ACPI_DB_REPAIR ACPI_DEBUG_LEVEL (ACPI_LV_REPAIR)
#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
/* Trace level -- also used in the global "DebugLevel" */ /* Trace level -- also used in the global "DebugLevel" */
...@@ -174,8 +176,8 @@ ...@@ -174,8 +176,8 @@
/* Defaults for debug_level, debug and normal */ /* Defaults for debug_level, debug and normal */
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO) #define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR)
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT) #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment