Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica: (26 commits)
  ACPICA: Update version to 20121018
  ACPICA: AcpiGetObjectInfo: Add support for ACPI 5 _SUB method
  ACPICA: Update for 64-bit generation of recent error message changes
  ACPICA: Fix externalize name to complete migration to ACPI_MOVE_NAME
  ACPICA: Add starting offset parameter to common dump buffer routine
  ACPICA: Deploy ACPI_MOVE_NAME across ACPICA source base
  ACPICA: Update support for ACPI 5 MPST table
  ACPICA: Enhance error reporting for invalid opcodes and bad ACPI_NAMEs
  ACPICA: Add ACPI_MOVE_NAME macro to optimize 4-byte ACPI_NAME copies
  ACPICA: AcpiExec: Improve algorithm for tracking memory leaks
  ACPICA: Add debug print message for mutex objects that are force-released
  ACPICA: Resource Mgr: Small fix for buffer size calculation
  ACPICA: Remove extra spaces after periods in the Intel license
  ACPICA: Remove extra spaces after periods within comments
  ACPICA: Update local C library module comments for ASCII table
  ACPICA: Fix for predefined name loop during ACPICA initialization
  ACPICA: Fix some typos in comments
  ACPICA: ACPICA core: Cleanup empty lines at file start and end
  ACPICA: Audit/update for ACPICA return macros and debug depth counter
  ACPICA: Fix unmerged acmacros.h divergences.
  ...
  • Loading branch information
Rafael J. Wysocki committed Nov 29, 2012
2 parents bcacbdb + a19ec8a commit 08ab729
Show file tree
Hide file tree
Showing 109 changed files with 2,669 additions and 666 deletions.
3 changes: 3 additions & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ acpi-y += \
utxfinit.o \
utxferror.o \
utxfmutex.o

acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o utclib.o

94 changes: 62 additions & 32 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,28 @@
#ifndef __ACDEBUG_H__
#define __ACDEBUG_H__

#define ACPI_DEBUG_BUFFER_SIZE 4196
#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */

struct command_info {
struct acpi_db_command_info {
char *name; /* Command Name */
u8 min_args; /* Minimum arguments required */
};

struct argument_info {
struct acpi_db_command_help {
u8 line_count; /* Number of help lines */
char *invocation; /* Command Invocation */
char *description; /* Command Description */
};

struct acpi_db_argument_info {
char *name; /* Argument Name */
};

struct acpi_db_execute_walk {
u32 count;
u32 max_count;
};

#define PARAM_LIST(pl) pl
#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
Expand All @@ -77,59 +88,71 @@ acpi_db_single_step(struct acpi_walk_state *walk_state,
/*
* dbcmds - debug commands and output routines
*/
acpi_status acpi_db_disassemble_method(char *name);
struct acpi_namespace_node *acpi_db_convert_to_node(char *in_string);

void acpi_db_display_table_info(char *table_arg);

void acpi_db_unload_acpi_table(char *table_arg, char *instance_arg);
void acpi_db_display_template(char *buffer_arg);

void
acpi_db_set_method_breakpoint(char *location,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void acpi_db_unload_acpi_table(char *name);

void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);
void acpi_db_send_notify(char *name, u32 value);

void acpi_db_get_bus_info(void);
void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg);

void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op);
acpi_status acpi_db_sleep(char *object_arg);

void acpi_db_dump_namespace(char *start_arg, char *depth_arg);
void acpi_db_display_locks(void);

void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg);
void acpi_db_display_resources(char *object_arg);

void acpi_db_send_notify(char *name, u32 value);
ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void))

void acpi_db_display_handlers(void);

ACPI_HW_DEPENDENT_RETURN_VOID(void
acpi_db_generate_gpe(char *gpe_arg,
char *block_arg))

/*
* dbmethod - control method commands
*/
void
acpi_db_set_method_breakpoint(char *location,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);

void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg);

acpi_status
acpi_db_display_objects(char *obj_type_arg, char *display_count_arg);
acpi_status acpi_db_disassemble_method(char *name);

void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg);
void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op);

acpi_status acpi_db_find_name_in_namespace(char *name_arg);
void acpi_db_batch_execute(char *count_arg);

/*
* dbnames - namespace commands
*/
void acpi_db_set_scope(char *name);

ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_db_sleep(char *object_arg))
void acpi_db_dump_namespace(char *start_arg, char *depth_arg);

void acpi_db_find_references(char *object_arg);
void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg);

void acpi_db_display_locks(void);
acpi_status acpi_db_find_name_in_namespace(char *name_arg);

void acpi_db_display_resources(char *object_arg);
void acpi_db_check_predefined_names(void);

ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void))
acpi_status
acpi_db_display_objects(char *obj_type_arg, char *display_count_arg);

void acpi_db_check_integrity(void);

ACPI_HW_DEPENDENT_RETURN_VOID(void
acpi_db_generate_gpe(char *gpe_arg,
char *block_arg))

void acpi_db_check_predefined_names(void);
void acpi_db_find_references(char *object_arg);

void acpi_db_batch_execute(void);
void acpi_db_get_bus_info(void);

/*
* dbdisply - debug display commands
Expand Down Expand Up @@ -161,7 +184,8 @@ acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
/*
* dbexec - debugger control method execution
*/
void acpi_db_execute(char *name, char **args, u32 flags);
void
acpi_db_execute(char *name, char **args, acpi_object_type * types, u32 flags);

void
acpi_db_create_execution_threads(char *num_threads_arg,
Expand All @@ -175,7 +199,8 @@ u32 acpi_db_get_cache_info(struct acpi_memory_list *cache);
* dbfileio - Debugger file I/O commands
*/
acpi_object_type
acpi_db_match_argument(char *user_argument, struct argument_info *arguments);
acpi_db_match_argument(char *user_argument,
struct acpi_db_argument_info *arguments);

void acpi_db_close_debug_file(void);

Expand Down Expand Up @@ -208,6 +233,11 @@ acpi_db_command_dispatch(char *input_buffer,

void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);

acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op);

char *acpi_db_get_next_token(char *string,
char **next, acpi_object_type * return_type);

/*
* dbstats - Generation and display of ACPI table statistics
*/
Expand Down
11 changes: 7 additions & 4 deletions drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,13 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);

struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object
*origin, union acpi_operand_object
*mth_desc, struct acpi_thread_state
*thread);
struct acpi_walk_state * acpi_ds_create_walk_state(acpi_owner_id owner_id,
union acpi_parse_object
*origin,
union acpi_operand_object
*mth_desc,
struct acpi_thread_state
*thread);

acpi_status
acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
Expand Down
6 changes: 4 additions & 2 deletions drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info);

acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info);

acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);

acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);

struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
u32 gpe_number);
Expand Down
73 changes: 38 additions & 35 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

/*
* Enable "slack" in the AML interpreter? Default is FALSE, and the
* interpreter strictly follows the ACPI specification. Setting to TRUE
* interpreter strictly follows the ACPI specification. Setting to TRUE
* allows the interpreter to ignore certain errors and/or bad AML constructs.
*
* Currently, these features are enabled by this flag:
Expand Down Expand Up @@ -153,26 +153,6 @@ u8 acpi_gbl_reduced_hardware;

ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);

/*****************************************************************************
*
* Debug support
*
****************************************************************************/

/* Procedure nesting level for debug output */

extern u32 acpi_gbl_nesting_level;

ACPI_EXTERN u32 acpi_gpe_count;
ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS];

/* Support for dynamic control method tracing mechanism */

ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;

/*****************************************************************************
*
* ACPI Table globals
Expand Down Expand Up @@ -259,15 +239,6 @@ ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE reg
*
****************************************************************************/

#ifdef ACPI_DBG_TRACK_ALLOCATIONS

/* Lists for tracking memory allocations */

ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
#endif

/* Object caches */

ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;
Expand Down Expand Up @@ -326,6 +297,15 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];

#endif

#ifdef ACPI_DBG_TRACK_ALLOCATIONS

/* Lists for tracking memory allocations */

ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
#endif

/*****************************************************************************
*
* Namespace globals
Expand Down Expand Up @@ -396,11 +376,33 @@ ACPI_EXTERN struct acpi_gpe_block_info
#if (!ACPI_REDUCED_HARDWARE)

ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized;
ACPI_EXTERN ACPI_GBL_EVENT_HANDLER acpi_gbl_global_event_handler;
ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler;
ACPI_EXTERN void *acpi_gbl_global_event_handler_context;

#endif /* !ACPI_REDUCED_HARDWARE */

/*****************************************************************************
*
* Debug support
*
****************************************************************************/

/* Procedure nesting level for debug output */

extern u32 acpi_gbl_nesting_level;

/* Event counters */

ACPI_EXTERN u32 acpi_gpe_count;
ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS];

/* Support for dynamic control method tracing mechanism */

ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;

/*****************************************************************************
*
* Debugger globals
Expand All @@ -426,10 +428,11 @@ ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;

ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN char acpi_gbl_db_line_buf[80];
ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE];
ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE];
ACPI_EXTERN char acpi_gbl_db_scope_buf[80];
ACPI_EXTERN char acpi_gbl_db_debug_filename[80];
ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
ACPI_EXTERN char *acpi_gbl_db_buffer;
ACPI_EXTERN char *acpi_gbl_db_filename;
Expand Down
16 changes: 10 additions & 6 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ struct acpi_create_field_info {
};

typedef
acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
acpi_status(*acpi_internal_method) (struct acpi_walk_state * walk_state);

/*
* Bitmapped ACPI types. Used internally only
* Bitmapped ACPI types. Used internally only
*/
#define ACPI_BTYPE_ANY 0x00000000
#define ACPI_BTYPE_INTEGER 0x00000001
Expand Down Expand Up @@ -486,8 +486,10 @@ struct acpi_gpe_device_info {
struct acpi_namespace_node *gpe_device;
};

typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block, void *context);
typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block,
void *context);

/* Information about each particular fixed event */

Expand Down Expand Up @@ -582,7 +584,7 @@ struct acpi_pscope_state {
};

/*
* Thread state - one per thread across multiple walk states. Multiple walk
* Thread state - one per thread across multiple walk states. Multiple walk
* states are created when there are nested control methods executing.
*/
struct acpi_thread_state {
Expand Down Expand Up @@ -645,7 +647,7 @@ union acpi_generic_state {
*
****************************************************************************/

typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);
typedef acpi_status(*acpi_execute_op) (struct acpi_walk_state * walk_state);

/* Address Range info block */

Expand Down Expand Up @@ -1031,6 +1033,7 @@ struct acpi_db_method_info {
acpi_handle method;
acpi_handle main_thread_gate;
acpi_handle thread_complete_gate;
acpi_handle info_gate;
acpi_thread_id *threads;
u32 num_threads;
u32 num_created;
Expand All @@ -1041,6 +1044,7 @@ struct acpi_db_method_info {
u32 num_loops;
char pathname[128];
char **args;
acpi_object_type *types;

/*
* Arguments to be passed to method for the command
Expand Down
Loading

0 comments on commit 08ab729

Please sign in to comment.