Skip to content

Commit

Permalink
ACPICA: Add repair for predefined methods that must return sorted lists
Browse files Browse the repository at this point in the history
This change will repair (by sorting) packages returned by _ALR,
_PSS, and _TSS. Drivers can now assume that the packages are
correctly sorted. Adds one new file, nsrepair2.c.
ACPICA BZ 784.

http://www.acpica.org/bugzilla/show_bug.cgi?id=784

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Nov 25, 2009
1 parent 419a909 commit ad5babe
Show file tree
Hide file tree
Showing 4 changed files with 559 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \
nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \
nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \
nsparse.o nspredef.o nsrepair.o
nsparse.o nspredef.o nsrepair.o nsrepair2.o

acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o

Expand Down
13 changes: 12 additions & 1 deletion drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ acpi_ns_get_attached_data(struct acpi_namespace_node *node,
acpi_object_handler handler, void **data);

/*
* nsrepair - return object repair for predefined methods/objects
* nsrepair - General return object repair for all
* predefined methods/objects
*/
acpi_status
acpi_ns_repair_object(struct acpi_predefined_data *data,
Expand All @@ -285,6 +286,16 @@ acpi_status
acpi_ns_repair_package_list(struct acpi_predefined_data *data,
union acpi_operand_object **obj_desc_ptr);

/*
* nsrepair2 - Return object repair for specific
* predefined methods/objects
*/
acpi_status
acpi_ns_complex_repairs(struct acpi_predefined_data *data,
struct acpi_namespace_node *node,
acpi_status validate_status,
union acpi_operand_object **return_object_ptr);

/*
* nssearch - Namespace searching and entry
*/
Expand Down
6 changes: 6 additions & 0 deletions drivers/acpi/acpica/nspredef.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
status = acpi_ns_check_package(data, return_object_ptr);
}

/*
* Perform additional, more complicated repairs on a per-name
* basis.
*/
status = acpi_ns_complex_repairs(data, node, status, return_object_ptr);

check_validation_status:
/*
* If the object validation failed or if we successfully repaired one
Expand Down
Loading

0 comments on commit ad5babe

Please sign in to comment.