Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29088
b: refs/heads/master
c: 52fc0b0
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Mar 31, 2006
1 parent c435b25 commit 5ad3030
Show file tree
Hide file tree
Showing 94 changed files with 467 additions and 145 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46358614ed5b031797522f1020e989c959a8d8a6
refs/heads/master: 52fc0b026e99b5d5d585095148d997d5634bbc25
1 change: 1 addition & 0 deletions trunk/drivers/acpi/dispatcher/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
* Walk the list of entries in the field_list
*/
while (arg) {

/* Ignore OFFSET and ACCESSAS terms here */

if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/acpi/dispatcher/dsmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
/* Invoke the global exception handler */

if (acpi_gbl_exception_handler) {

/* Exit the interpreter, allow handler to execute methods */

acpi_ex_exit_interpreter();
Expand All @@ -100,6 +101,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
}
#ifdef ACPI_DISASSEMBLER
if (ACPI_FAILURE(status)) {

/* Display method locals/args if disassembler is present */

acpi_dm_dump_method_info(status, walk_state, walk_state->op);
Expand Down Expand Up @@ -249,6 +251,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
}

if (!(obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY)) {

/* 1) Parse: Create a new walk state for the preempting walk */

next_walk_state =
Expand Down Expand Up @@ -378,9 +381,11 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
/* Did the called method return a value? */

if (return_desc) {

/* Are we actually going to use the return value? */

if (walk_state->return_used) {

/* Save the return value from the previous method */

status = acpi_ds_result_push(return_desc, walk_state);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/acpi/dispatcher/dsmthdat.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ acpi_ds_method_data_get_type(u16 opcode,

object = acpi_ns_get_attached_object(node);
if (!object) {

/* Uninitialized local/arg, return TYPE_ANY */

return_VALUE(ACPI_TYPE_ANY);
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/acpi/dispatcher/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
common.
node)));
if (ACPI_FAILURE(status)) {

/* Check if we are resolving a named reference within a package */

if ((status == AE_NOT_FOUND)
Expand Down Expand Up @@ -195,6 +196,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
*/
obj_desc = *obj_desc_ptr;
if (!obj_desc) {

/* Create a new buffer object */

obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER);
Expand Down Expand Up @@ -355,6 +357,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
arg = arg->common.next;
for (i = 0; arg; i++) {
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {

/* Object (package or buffer) is already built */

obj_desc->package.elements[i] =
Expand Down Expand Up @@ -408,6 +411,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
}

if (!op->common.value.arg) {

/* No arguments, there is nothing to do */

return_ACPI_STATUS(AE_OK);
Expand Down Expand Up @@ -469,6 +473,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
obj_desc = *ret_obj_desc;
op_info = acpi_ps_get_opcode_info(opcode);
if (op_info->class == AML_CLASS_UNKNOWN) {

/* Unknown opcode */

return_ACPI_STATUS(AE_TYPE);
Expand Down Expand Up @@ -626,6 +631,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
default: /* Other literals, etc.. */

if (op->common.aml_opcode == AML_INT_NAMEPATH_OP) {

/* Node was saved in Op */

obj_desc->reference.node = op->common.node;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/acpi/dispatcher/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
/* Initialize the Buffer Field */

if (op->common.aml_opcode == AML_CREATE_FIELD_OP) {

/* NOTE: Slightly different operands for this opcode */

status =
Expand Down Expand Up @@ -984,6 +985,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", op));

if (walk_state->control_state->common.value) {

/* Predicate was true, go back and evaluate it again! */

status = AE_CTRL_PENDING;
Expand Down Expand Up @@ -1014,6 +1016,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
* has been bubbled up the tree
*/
if (op->common.value.arg) {

/* Since we have a real Return(), delete any implicit return */

acpi_ds_clear_implicit_return(walk_state);
Expand Down Expand Up @@ -1047,6 +1050,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
walk_state->return_desc = walk_state->operands[0];
} else if ((walk_state->results) &&
(walk_state->results->results.num_results > 0)) {

/* Since we have a real Return(), delete any implicit return */

acpi_ds_clear_implicit_return(walk_state);
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/acpi/dispatcher/dsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
*/
if ((!op->common.parent) ||
(op->common.parent->common.aml_opcode == AML_SCOPE_OP)) {

/* No parent, the return value cannot possibly be used */

ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
Expand Down Expand Up @@ -352,6 +353,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
}

if (!acpi_ds_is_result_used(op, walk_state)) {

/* Must pop the result stack (obj_desc should be equal to result_obj) */

status = acpi_ds_result_pop(&obj_desc, walk_state);
Expand Down Expand Up @@ -498,7 +500,9 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
*/
if ((walk_state->deferred_node) &&
(walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD)
&& (arg_index != 0)) {
&& (arg_index ==
(u32) ((walk_state->opcode ==
AML_CREATE_FIELD_OP) ? 3 : 2))) {
obj_desc =
ACPI_CAST_PTR(union acpi_operand_object,
walk_state->deferred_node);
Expand All @@ -521,6 +525,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
&& (parent_op->common.aml_opcode != AML_REGION_OP)
&& (parent_op->common.aml_opcode !=
AML_INT_NAMEPATH_OP)) {

/* Enter name into namespace if not found */

interpreter_mode = ACPI_IMODE_LOAD_PASS2;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/acpi/dispatcher/dswexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
* being the object_type and size_of operators.
*/
if (!(walk_state->op_info->flags & AML_NO_OPERAND_RESOLVE)) {

/* Resolve all operands */

status = acpi_ex_resolve_operands(walk_state->opcode,
Expand Down Expand Up @@ -548,6 +549,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
*/
status = acpi_ds_resolve_operands(walk_state);
if (ACPI_FAILURE(status)) {

/* On error, clear all resolved operands */

acpi_ds_clear_operands(walk_state);
Expand Down Expand Up @@ -722,6 +724,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
cleanup:

if (walk_state->result_obj) {

/* Break to debugger to display result */

ACPI_DEBUGGER_EXEC(acpi_db_display_result_object
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/acpi/dispatcher/dswload.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
*/

if (walk_state->deferred_node) {

/* This name is already in the namespace, get the node */

node = walk_state->deferred_node;
Expand Down Expand Up @@ -311,6 +312,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
/* Common exit */

if (!op) {

/* Create a new op */

op = acpi_ps_alloc_op(walk_state->opcode);
Expand Down Expand Up @@ -413,6 +415,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
#endif

if (op->common.aml_opcode == AML_NAME_OP) {

/* For Name opcode, get the object type from the argument */

if (op->common.value.arg) {
Expand Down Expand Up @@ -521,6 +524,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
if ((walk_state->control_state) &&
(walk_state->control_state->common.state ==
ACPI_CONTROL_CONDITIONAL_EXECUTING)) {

/* We are executing a while loop outside of a method */

status = acpi_ds_exec_begin_op(walk_state, out_op);
Expand Down Expand Up @@ -554,10 +558,12 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
/* Get the name we are going to enter or lookup in the namespace */

if (walk_state->opcode == AML_INT_NAMEPATH_OP) {

/* For Namepath op, get the path string */

buffer_ptr = op->common.value.string;
if (!buffer_ptr) {

/* No name, just exit */

return_ACPI_STATUS(AE_OK);
Expand Down Expand Up @@ -680,6 +686,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
/* All other opcodes */

if (op && op->common.node) {

/* This op/node was previously entered into the namespace */

node = op->common.node;
Expand All @@ -705,6 +712,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
* Note: Name may already exist if we are executing a deferred opcode.
*/
if (walk_state->deferred_node) {

/* This name is already in the namespace, get the node */

node = walk_state->deferred_node;
Expand All @@ -727,6 +735,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
}

if (!op) {

/* Create a new op */

op = acpi_ps_alloc_op(walk_state->opcode);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/acpi/dispatcher/dswscope.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state)
ACPI_FUNCTION_NAME("ds_scope_stack_clear");

while (walk_state->scope_info) {

/* Pop a scope off the stack */

scope_info = walk_state->scope_info;
Expand Down Expand Up @@ -105,6 +106,7 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
ACPI_FUNCTION_TRACE("ds_scope_stack_push");

if (!node) {

/* Invalid scope */

ACPI_ERROR((AE_INFO, "Null scope parameter"));
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/acpi/dispatcher/dswstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
state->results.num_results--;

for (index = ACPI_OBJ_NUM_OPERANDS; index; index--) {

/* Check for a valid result object */

if (state->results.obj_desc[index - 1]) {
Expand Down Expand Up @@ -448,6 +449,7 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state)
ACPI_FUNCTION_NAME("ds_obj_stack_pop");

for (i = 0; i < pop_count; i++) {

/* Check for stack underflow */

if (walk_state->num_operands == 0) {
Expand Down Expand Up @@ -494,6 +496,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
ACPI_FUNCTION_NAME("ds_obj_stack_pop_and_delete");

for (i = 0; i < pop_count; i++) {

/* Check for stack underflow */

if (walk_state->num_operands == 0) {
Expand Down Expand Up @@ -598,6 +601,7 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
walk_state = thread->walk_state_list;

if (walk_state) {

/* Next walk state becomes the current walk state */

thread->walk_state_list = walk_state->next;
Expand Down Expand Up @@ -778,6 +782,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
}

if (parser_state->start_node) {

/* Push start scope on scope stack and make it current */

status =
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/acpi/events/evevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,14 @@ u32 acpi_ev_fixed_event_detect(void)
* Check for all possible Fixed Events and dispatch those that are active
*/
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {

/* Both the status and enable bits must be on for this event */

if ((fixed_status & acpi_gbl_fixed_event_info[i].
status_bit_mask)
&& (fixed_enable & acpi_gbl_fixed_event_info[i].
enable_bit_mask)) {

/* Found an active (signalled) event */

int_status |= acpi_ev_fixed_event_dispatch((u32) i);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/acpi/events/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
ACPI_SET_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);

if (write_to_hardware) {

/* Clear the GPE (of stale events), then enable it */

status = acpi_hw_clear_gpe(gpe_event_info);
Expand Down Expand Up @@ -313,6 +314,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
/* A NULL gpe_block means use the FADT-defined GPE block(s) */

if (!gpe_device) {

/* Examine GPE Block 0 and 1 (These blocks are permanent) */

for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) {
Expand Down Expand Up @@ -402,6 +404,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
* Find all currently active GP events.
*/
for (i = 0; i < gpe_block->register_count; i++) {

/* Get the next status/enable pair */

gpe_register_info = &gpe_block->register_info[i];
Expand Down Expand Up @@ -437,6 +440,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)

enabled_status_byte = (u8) (status_reg & enable_reg);
if (!enabled_status_byte) {

/* No active GPEs in this register, move on */

continue;
Expand All @@ -445,6 +449,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
/* Now look at the individual GPEs in this byte register */

for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {

/* Examine one GPE bit */

if (enabled_status_byte &
Expand Down
Loading

0 comments on commit 5ad3030

Please sign in to comment.