Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7784
b: refs/heads/master
c: 73459f7
h: refs/heads/master
v: v3
  • Loading branch information
Robert Moore authored and Len Brown committed Jul 14, 2005
1 parent 9464a6a commit f5148e9
Show file tree
Hide file tree
Showing 57 changed files with 2,625 additions and 2,034 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: 88ac00f5a841dcfc5c682000f4a6add0add8caac
refs/heads/master: 73459f73e5d1602c59ebec114fc45185521353c1
15 changes: 2 additions & 13 deletions trunk/drivers/acpi/dispatcher/dsmthdat.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,23 +632,12 @@ acpi_ds_store_object_to_local (
* Weird, but true.
*/
if (opcode == AML_ARG_OP) {
/*
* Make sure that the object is the correct type. This may be
* overkill, butit is here because references were NS nodes in
* the past. Now they are operand objects of type Reference.
*/
if (ACPI_GET_DESCRIPTOR_TYPE (current_obj_desc) != ACPI_DESC_TYPE_OPERAND) {
ACPI_REPORT_ERROR ((
"Invalid descriptor type while storing to method arg: [%s]\n",
acpi_ut_get_descriptor_name (current_obj_desc)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}

/*
* If we have a valid reference object that came from ref_of(),
* do the indirect store
*/
if ((current_obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
if ((ACPI_GET_DESCRIPTOR_TYPE (current_obj_desc) == ACPI_DESC_TYPE_OPERAND) &&
(current_obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
(current_obj_desc->reference.opcode == AML_REF_OF_OP)) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Arg (%p) is an obj_ref(Node), storing in node %p\n",
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/dispatcher/dswload.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include <acpi/acnamesp.h>
#include <acpi/acevents.h>

#ifdef _ACPI_ASL_COMPILER
#ifdef ACPI_ASL_COMPILER
#include <acpi/acdisasm.h>
#endif

Expand Down Expand Up @@ -176,7 +176,7 @@ acpi_ds_load1_begin_op (
*/
status = acpi_ns_lookup (walk_state->scope_info, path, object_type,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, walk_state, &(node));
#ifdef _ACPI_ASL_COMPILER
#ifdef ACPI_ASL_COMPILER
if (status == AE_NOT_FOUND) {
/*
* Table disassembly:
Expand Down Expand Up @@ -569,7 +569,7 @@ acpi_ds_load2_begin_op (
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
walk_state, &(node));
if (ACPI_FAILURE (status)) {
#ifdef _ACPI_ASL_COMPILER
#ifdef ACPI_ASL_COMPILER
if (status == AE_NOT_FOUND) {
status = AE_OK;
}
Expand Down
33 changes: 3 additions & 30 deletions trunk/drivers/acpi/dispatcher/dswstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ acpi_ds_create_walk_state (
ACPI_FUNCTION_TRACE ("ds_create_walk_state");


walk_state = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_WALK);
walk_state = ACPI_MEM_CALLOCATE (sizeof (struct acpi_walk_state));
if (!walk_state) {
return_PTR (NULL);
}
Expand All @@ -704,7 +704,7 @@ acpi_ds_create_walk_state (

status = acpi_ds_result_stack_push (walk_state);
if (ACPI_FAILURE (status)) {
acpi_ut_release_to_cache (ACPI_MEM_LIST_WALK, walk_state);
ACPI_MEM_FREE (walk_state);
return_PTR (NULL);
}

Expand Down Expand Up @@ -900,38 +900,11 @@ acpi_ds_delete_walk_state (
acpi_ut_delete_generic_state (state);
}

acpi_ut_release_to_cache (ACPI_MEM_LIST_WALK, walk_state);
ACPI_MEM_FREE (walk_state);
return_VOID;
}


#ifdef ACPI_ENABLE_OBJECT_CACHE
/******************************************************************************
*
* FUNCTION: acpi_ds_delete_walk_state_cache
*
* PARAMETERS: None
*
* RETURN: None
*
* DESCRIPTION: Purge the global state object cache. Used during subsystem
* termination.
*
******************************************************************************/

void
acpi_ds_delete_walk_state_cache (
void)
{
ACPI_FUNCTION_TRACE ("ds_delete_walk_state_cache");


acpi_ut_delete_generic_cache (ACPI_MEM_LIST_WALK);
return_VOID;
}
#endif


#ifdef ACPI_OBSOLETE_FUNCTIONS
/*******************************************************************************
*
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/acpi/events/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ acpi_ev_gpe_detect (
struct acpi_gpe_register_info *gpe_register_info;
u32 status_reg;
u32 enable_reg;
u32 flags;
acpi_status status;
struct acpi_gpe_block_info *gpe_block;
acpi_native_uint i;
Expand All @@ -412,7 +413,7 @@ acpi_ev_gpe_detect (

/* Examine all GPE blocks attached to this interrupt level */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
gpe_block = gpe_xrupt_list->gpe_block_list_head;
while (gpe_block) {
/*
Expand Down Expand Up @@ -476,7 +477,7 @@ acpi_ev_gpe_detect (

unlock_and_exit:

acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
return (int_status);
}

Expand Down
27 changes: 15 additions & 12 deletions trunk/drivers/acpi/events/evgpeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ acpi_ev_valid_gpe_event (
* FUNCTION: acpi_ev_walk_gpe_list
*
* PARAMETERS: gpe_walk_callback - Routine called for each GPE block
* Flags - ACPI_NOT_ISR or ACPI_ISR
*
* RETURN: Status
*
Expand All @@ -148,18 +147,18 @@ acpi_ev_valid_gpe_event (

acpi_status
acpi_ev_walk_gpe_list (
ACPI_GPE_CALLBACK gpe_walk_callback,
u32 flags)
ACPI_GPE_CALLBACK gpe_walk_callback)
{
struct acpi_gpe_block_info *gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_info;
acpi_status status = AE_OK;
u32 flags;


ACPI_FUNCTION_TRACE ("ev_walk_gpe_list");


acpi_os_acquire_lock (acpi_gbl_gpe_lock, flags);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);

/* Walk the interrupt level descriptor list */

Expand Down Expand Up @@ -500,6 +499,7 @@ acpi_ev_get_gpe_xrupt_block (
struct acpi_gpe_xrupt_info *next_gpe_xrupt;
struct acpi_gpe_xrupt_info *gpe_xrupt;
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block");
Expand Down Expand Up @@ -527,7 +527,7 @@ acpi_ev_get_gpe_xrupt_block (

/* Install new interrupt descriptor with spin lock */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
if (acpi_gbl_gpe_xrupt_list_head) {
next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
while (next_gpe_xrupt->next) {
Expand All @@ -540,7 +540,7 @@ acpi_ev_get_gpe_xrupt_block (
else {
acpi_gbl_gpe_xrupt_list_head = gpe_xrupt;
}
acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);

/* Install new interrupt handler if not SCI_INT */

Expand Down Expand Up @@ -577,6 +577,7 @@ acpi_ev_delete_gpe_xrupt (
struct acpi_gpe_xrupt_info *gpe_xrupt)
{
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("ev_delete_gpe_xrupt");
Expand All @@ -599,15 +600,15 @@ acpi_ev_delete_gpe_xrupt (

/* Unlink the interrupt block with lock */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
if (gpe_xrupt->previous) {
gpe_xrupt->previous->next = gpe_xrupt->next;
}

if (gpe_xrupt->next) {
gpe_xrupt->next->previous = gpe_xrupt->previous;
}
acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);

/* Free the block */

Expand Down Expand Up @@ -637,6 +638,7 @@ acpi_ev_install_gpe_block (
struct acpi_gpe_block_info *next_gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_block;
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("ev_install_gpe_block");
Expand All @@ -655,7 +657,7 @@ acpi_ev_install_gpe_block (

/* Install the new block at the end of the list with lock */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
if (gpe_xrupt_block->gpe_block_list_head) {
next_gpe_block = gpe_xrupt_block->gpe_block_list_head;
while (next_gpe_block->next) {
Expand All @@ -670,7 +672,7 @@ acpi_ev_install_gpe_block (
}

gpe_block->xrupt_block = gpe_xrupt_block;
acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);

unlock_and_exit:
status = acpi_ut_release_mutex (ACPI_MTX_EVENTS);
Expand All @@ -695,6 +697,7 @@ acpi_ev_delete_gpe_block (
struct acpi_gpe_block_info *gpe_block)
{
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("ev_install_gpe_block");
Expand All @@ -720,7 +723,7 @@ acpi_ev_delete_gpe_block (
else {
/* Remove the block on this interrupt with lock */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
if (gpe_block->previous) {
gpe_block->previous->next = gpe_block->next;
}
Expand All @@ -731,7 +734,7 @@ acpi_ev_delete_gpe_block (
if (gpe_block->next) {
gpe_block->next->previous = gpe_block->previous;
}
acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
}

/* Free the gpe_block */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/events/evmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ acpi_ev_terminate (

/* Disable all GPEs in all GPE blocks */

status = acpi_ev_walk_gpe_list (acpi_hw_disable_gpe_block, ACPI_NOT_ISR);
status = acpi_ev_walk_gpe_list (acpi_hw_disable_gpe_block);

/* Remove SCI handler */

Expand All @@ -602,7 +602,7 @@ acpi_ev_terminate (

/* Deallocate all handler objects installed within GPE info structs */

status = acpi_ev_walk_gpe_list (acpi_ev_delete_gpe_handlers, ACPI_NOT_ISR);
status = acpi_ev_walk_gpe_list (acpi_ev_delete_gpe_handlers);

/* Return to original mode if necessary */

Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/acpi/events/evxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ acpi_install_gpe_handler (
struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler;
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
Expand Down Expand Up @@ -643,15 +644,15 @@ acpi_install_gpe_handler (

/* Install the handler */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
gpe_event_info->dispatch.handler = handler;

/* Setup up dispatch flags to indicate handler (vs. method) */

gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */
gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);

acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);


unlock_and_exit:
Expand Down Expand Up @@ -685,6 +686,7 @@ acpi_remove_gpe_handler (
struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler;
acpi_status status;
u32 flags;


ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
Expand Down Expand Up @@ -741,7 +743,7 @@ acpi_remove_gpe_handler (

/* Remove the handler */

acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
handler = gpe_event_info->dispatch.handler;

/* Restore Method node (if any), set dispatch flags */
Expand All @@ -751,7 +753,7 @@ acpi_remove_gpe_handler (
if (handler->method_node) {
gpe_event_info->flags |= ACPI_GPE_DISPATCH_METHOD;
}
acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
acpi_os_release_lock (acpi_gbl_gpe_lock, flags);

/* Now we can free the handler object */

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/executer/exconvrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ acpi_ex_convert_to_ascii (

/* hex_length: 2 ascii hex chars per data byte */

hex_length = ACPI_MUL_2 (data_width);
hex_length = (acpi_native_uint) ACPI_MUL_2 (data_width);
for (i = 0, j = (hex_length-1); i < hex_length; i++, j--) {
/* Get one hex digit, most significant digits first */

Expand Down
Loading

0 comments on commit f5148e9

Please sign in to comment.