diff options
author | Bob Moore <robert.moore@intel.com> | 2006-06-08 16:29:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 02:45:47 -0400 |
commit | 4c90ece249992c7a2e3fc921e5cdb8eb92193067 (patch) | |
tree | e145ffe472802ef870ba1eaea150b688c19e45ca /drivers/acpi/executer | |
parent | 4119532c95547821dbe72d6916dfa1b2148475b3 (diff) |
ACPI: ACPICA 20060608
Converted the locking mutex used for the ACPI hardware
to a spinlock. This change should eliminate all problems
caused by attempting to acquire a semaphore at interrupt
level, and it means that all ACPICA external interfaces
that directly access the ACPI hardware can be safely
called from interrupt level.
Fixed a regression introduced in 20060526 where the ACPI
device initialization could be prematurely aborted with
an AE_NOT_FOUND if a device did not have an optional
_INI method.
Fixed an IndexField issue where a write to the Data
Register should be limited in size to the AccessSize
(width) of the IndexField itself. (BZ 433, Fiodor Suietov)
Fixed problem reports (Valery Podrezov) integrated: - Allow
store of ThermalZone objects to Debug object.
http://bugzilla.kernel.org/show_bug.cgi?id=5369
http://bugzilla.kernel.org/show_bug.cgi?id=5370
Fixed problem reports (Fiodor Suietov) integrated: -
acpi_get_table_header() doesn't handle multiple instances
correctly (BZ 364)
Removed four global mutexes that were obsolete and were
no longer being used.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r-- | drivers/acpi/executer/exfldio.c | 8 | ||||
-rw-r--r-- | drivers/acpi/executer/exoparg1.c | 10 | ||||
-rw-r--r-- | drivers/acpi/executer/exresnte.c | 6 | ||||
-rw-r--r-- | drivers/acpi/executer/exresolv.c | 20 | ||||
-rw-r--r-- | drivers/acpi/executer/exutils.c | 4 |
5 files changed, 33 insertions, 15 deletions
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index 3b7c4352ec57..051053f7cccb 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c | |||
@@ -785,6 +785,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
785 | { | 785 | { |
786 | acpi_status status; | 786 | acpi_status status; |
787 | acpi_integer mask; | 787 | acpi_integer mask; |
788 | acpi_integer width_mask; | ||
788 | acpi_integer merged_datum; | 789 | acpi_integer merged_datum; |
789 | acpi_integer raw_datum = 0; | 790 | acpi_integer raw_datum = 0; |
790 | u32 field_offset = 0; | 791 | u32 field_offset = 0; |
@@ -809,8 +810,11 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
809 | 810 | ||
810 | /* Compute the number of datums (access width data items) */ | 811 | /* Compute the number of datums (access width data items) */ |
811 | 812 | ||
813 | width_mask = | ||
814 | ACPI_MASK_BITS_ABOVE(obj_desc->common_field.access_bit_width); | ||
812 | mask = | 815 | mask = |
813 | ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset); | 816 | width_mask & ACPI_MASK_BITS_BELOW(obj_desc->common_field. |
817 | start_field_bit_offset); | ||
814 | 818 | ||
815 | datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, | 819 | datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, |
816 | obj_desc->common_field.access_bit_width); | 820 | obj_desc->common_field.access_bit_width); |
@@ -850,7 +854,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
850 | merged_datum = raw_datum >> | 854 | merged_datum = raw_datum >> |
851 | (obj_desc->common_field.access_bit_width - | 855 | (obj_desc->common_field.access_bit_width - |
852 | obj_desc->common_field.start_field_bit_offset); | 856 | obj_desc->common_field.start_field_bit_offset); |
853 | mask = ACPI_INTEGER_MAX; | 857 | mask = width_mask; |
854 | 858 | ||
855 | if (i == datum_count) { | 859 | if (i == datum_count) { |
856 | break; | 860 | break; |
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 8284c52875be..6374d8be88e0 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -322,8 +322,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
322 | 322 | ||
323 | /* Since the bit position is one-based, subtract from 33 (65) */ | 323 | /* Since the bit position is one-based, subtract from 33 (65) */ |
324 | 324 | ||
325 | return_desc->integer.value = temp32 == 0 ? 0 : | 325 | return_desc->integer.value = |
326 | (ACPI_INTEGER_BIT_SIZE + 1) - temp32; | 326 | temp32 == |
327 | 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - temp32; | ||
327 | break; | 328 | break; |
328 | 329 | ||
329 | case AML_FROM_BCD_OP: /* from_bcd (BCDValue, Result) */ | 330 | case AML_FROM_BCD_OP: /* from_bcd (BCDValue, Result) */ |
@@ -698,6 +699,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
698 | if (ACPI_FAILURE(status)) { | 699 | if (ACPI_FAILURE(status)) { |
699 | goto cleanup; | 700 | goto cleanup; |
700 | } | 701 | } |
702 | |||
701 | /* Allocate a descriptor to hold the type. */ | 703 | /* Allocate a descriptor to hold the type. */ |
702 | 704 | ||
703 | return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); | 705 | return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); |
@@ -967,7 +969,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
967 | acpi_ut_add_reference | 969 | acpi_ut_add_reference |
968 | (return_desc); | 970 | (return_desc); |
969 | } | 971 | } |
970 | |||
971 | break; | 972 | break; |
972 | 973 | ||
973 | default: | 974 | default: |
@@ -987,7 +988,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
987 | 988 | ||
988 | if (ACPI_GET_DESCRIPTOR_TYPE(return_desc) == | 989 | if (ACPI_GET_DESCRIPTOR_TYPE(return_desc) == |
989 | ACPI_DESC_TYPE_NAMED) { | 990 | ACPI_DESC_TYPE_NAMED) { |
990 | |||
991 | return_desc = | 991 | return_desc = |
992 | acpi_ns_get_attached_object((struct | 992 | acpi_ns_get_attached_object((struct |
993 | acpi_namespace_node | 993 | acpi_namespace_node |
@@ -1002,7 +1002,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
1002 | 1002 | ||
1003 | default: | 1003 | default: |
1004 | ACPI_ERROR((AE_INFO, | 1004 | ACPI_ERROR((AE_INFO, |
1005 | "Unknown opcode in ref(%p) - %X", | 1005 | "Unknown opcode in reference(%p) - %X", |
1006 | operand[0], | 1006 | operand[0], |
1007 | operand[0]->reference.opcode)); | 1007 | operand[0]->reference.opcode)); |
1008 | 1008 | ||
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index f9b9f5008596..3089b05a1368 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c | |||
@@ -114,10 +114,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Several object types require no further processing: | 116 | * Several object types require no further processing: |
117 | * 1) Devices rarely have an attached object, return the Node | 117 | * 1) Device/Thermal objects don't have a "real" subobject, return the Node |
118 | * 2) Method locals and arguments have a pseudo-Node | 118 | * 2) Method locals and arguments have a pseudo-Node |
119 | */ | 119 | */ |
120 | if (entry_type == ACPI_TYPE_DEVICE || | 120 | if ((entry_type == ACPI_TYPE_DEVICE) || |
121 | (entry_type == ACPI_TYPE_THERMAL) || | ||
121 | (node->flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL))) { | 122 | (node->flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL))) { |
122 | return_ACPI_STATUS(AE_OK); | 123 | return_ACPI_STATUS(AE_OK); |
123 | } | 124 | } |
@@ -216,7 +217,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
216 | case ACPI_TYPE_METHOD: | 217 | case ACPI_TYPE_METHOD: |
217 | case ACPI_TYPE_POWER: | 218 | case ACPI_TYPE_POWER: |
218 | case ACPI_TYPE_PROCESSOR: | 219 | case ACPI_TYPE_PROCESSOR: |
219 | case ACPI_TYPE_THERMAL: | ||
220 | case ACPI_TYPE_EVENT: | 220 | case ACPI_TYPE_EVENT: |
221 | case ACPI_TYPE_REGION: | 221 | case ACPI_TYPE_REGION: |
222 | 222 | ||
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index 006bba035d51..6499de878017 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c | |||
@@ -257,10 +257,24 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
257 | 257 | ||
258 | case AML_INT_NAMEPATH_OP: /* Reference to a named object */ | 258 | case AML_INT_NAMEPATH_OP: /* Reference to a named object */ |
259 | 259 | ||
260 | /* Get the object pointed to by the namespace node */ | 260 | /* Dereference the name */ |
261 | |||
262 | if ((stack_desc->reference.node->type == | ||
263 | ACPI_TYPE_DEVICE) | ||
264 | || (stack_desc->reference.node->type == | ||
265 | ACPI_TYPE_THERMAL)) { | ||
266 | |||
267 | /* These node types do not have 'real' subobjects */ | ||
268 | |||
269 | *stack_ptr = (void *)stack_desc->reference.node; | ||
270 | } else { | ||
271 | /* Get the object pointed to by the namespace node */ | ||
272 | |||
273 | *stack_ptr = | ||
274 | (stack_desc->reference.node)->object; | ||
275 | acpi_ut_add_reference(*stack_ptr); | ||
276 | } | ||
261 | 277 | ||
262 | *stack_ptr = (stack_desc->reference.node)->object; | ||
263 | acpi_ut_add_reference(*stack_ptr); | ||
264 | acpi_ut_remove_reference(stack_desc); | 278 | acpi_ut_remove_reference(stack_desc); |
265 | break; | 279 | break; |
266 | 280 | ||
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index 3ef8cd703e06..982c8b65876f 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c | |||
@@ -89,7 +89,7 @@ acpi_status acpi_ex_enter_interpreter(void) | |||
89 | 89 | ||
90 | ACPI_FUNCTION_TRACE(ex_enter_interpreter); | 90 | ACPI_FUNCTION_TRACE(ex_enter_interpreter); |
91 | 91 | ||
92 | status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); | 92 | status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); |
93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
94 | ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); | 94 | ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); |
95 | } | 95 | } |
@@ -125,7 +125,7 @@ void acpi_ex_exit_interpreter(void) | |||
125 | 125 | ||
126 | ACPI_FUNCTION_TRACE(ex_exit_interpreter); | 126 | ACPI_FUNCTION_TRACE(ex_exit_interpreter); |
127 | 127 | ||
128 | status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); | 128 | status = acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); |
129 | if (ACPI_FAILURE(status)) { | 129 | if (ACPI_FAILURE(status)) { |
130 | ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); | 130 | ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); |
131 | } | 131 | } |