Skip to content

Commit

Permalink
Merge branch 'acpica' into acpi-trace
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Aug 7, 2015
2 parents 74d3329 + 40913fe commit 6d63e35
Show file tree
Hide file tree
Showing 45 changed files with 1,491 additions and 700 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-y += acpi.o
acpi-y := \
dsargs.o \
dscontrol.o \
dsdebug.o \
dsfield.o \
dsinit.o \
dsmethod.o \
Expand Down Expand Up @@ -164,6 +165,7 @@ acpi-y += \
utmath.o \
utmisc.o \
utmutex.o \
utnonansi.o \
utobject.o \
utosi.o \
utownerid.o \
Expand Down
19 changes: 19 additions & 0 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg);

acpi_status acpi_db_sleep(char *object_arg);

void acpi_db_trace(char *enable_arg, char *method_arg, char *once_arg);

void acpi_db_display_locks(void);

void acpi_db_display_resources(char *object_arg);
Expand Down Expand Up @@ -261,6 +263,23 @@ 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);

/*
* dbobject
*/
void acpi_db_decode_internal_object(union acpi_operand_object *obj_desc);

void
acpi_db_display_internal_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void acpi_db_decode_arguments(struct acpi_walk_state *walk_state);

void acpi_db_decode_locals(struct acpi_walk_state *walk_state);

void
acpi_db_dump_method_info(acpi_status status,
struct acpi_walk_state *walk_state);

/*
* dbstats - Generation and display of ACPI table statistics
*/
Expand Down
8 changes: 8 additions & 0 deletions drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,12 @@ acpi_status
acpi_ds_result_push(union acpi_operand_object *object,
struct acpi_walk_state *walk_state);

/*
* dsdebug - parser debugging routines
*/
void
acpi_ds_dump_method_stack(acpi_status status,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

#endif /* _ACDISPAT_H_ */
3 changes: 1 addition & 2 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);

ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_level);
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_layer);

/*****************************************************************************
*
Expand All @@ -309,6 +307,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE);
ACPI_INIT_GLOBAL(union acpi_parse_object *, acpi_gbl_previous_op, NULL);

ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
Expand Down
22 changes: 22 additions & 0 deletions drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,28 @@ void
acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
u32 level, u32 index);

void
acpi_ex_start_trace_method(struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void
acpi_ex_stop_trace_method(struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void
acpi_ex_start_trace_opcode(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

void
acpi_ex_stop_trace_opcode(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

void
acpi_ex_trace_point(acpi_trace_event_type type,
u8 begin, u8 *aml, char *pathname);

/*
* exfield - ACPI AML (p-code) execution - field manipulation
*/
Expand Down
11 changes: 9 additions & 2 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ struct acpi_namespace_node {
*/
#ifdef ACPI_LARGE_NAMESPACE_NODE
union acpi_parse_object *op;
void *method_locals;
void *method_args;
u32 value;
u32 length;
u8 arg_count;

#endif
};

Expand Down Expand Up @@ -715,7 +719,7 @@ union acpi_parse_value {
union acpi_parse_object *arg; /* arguments and contained ops */
};

#ifdef ACPI_DISASSEMBLER
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
#define ACPI_DISASM_ONLY_MEMBERS(a) a;
#else
#define ACPI_DISASM_ONLY_MEMBERS(a)
Expand All @@ -726,7 +730,7 @@ union acpi_parse_value {
u8 descriptor_type; /* To differentiate various internal objs */\
u8 flags; /* Type of Op */\
u16 aml_opcode; /* AML opcode */\
u32 aml_offset; /* Offset of declaration in AML */\
u8 *aml; /* Address of declaration in AML */\
union acpi_parse_object *next; /* Next op */\
struct acpi_namespace_node *node; /* For use by interpreter */\
union acpi_parse_value value; /* Value or args associated with the opcode */\
Expand Down Expand Up @@ -1103,6 +1107,9 @@ struct acpi_db_method_info {
* Index of current thread inside all them created.
*/
char init_args;
#ifdef ACPI_DEBUGGER
acpi_object_type arg_types[4];
#endif
char *arguments[4];
char num_threads_str[11];
char id_of_thread_str[11];
Expand Down
9 changes: 9 additions & 0 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,15 @@
#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)

/* Test for ASCII character */

#define ACPI_IS_ASCII(c) ((c) < 0x80)

/* Signed integers */

#define ACPI_SIGN_POSITIVE 0
#define ACPI_SIGN_NEGATIVE 1

/*
* Rounding macros (Power of two boundaries only)
*/
Expand Down
13 changes: 8 additions & 5 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,20 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
*/
u32 acpi_ns_opens_scope(acpi_object_type type);

acpi_status
acpi_ns_build_external_path(struct acpi_namespace_node *node,
acpi_size size, char *name_buffer);

char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);

u32
acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
char *full_path, u32 path_size, u8 no_trailing);

char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
u8 no_trailing);

char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);

acpi_status
acpi_ns_handle_to_pathname(acpi_handle target_handle,
struct acpi_buffer *buffer);
struct acpi_buffer *buffer, u8 no_trailing);

u8
acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ struct acpi_object_method {
u8 param_count;
u8 sync_level;
union acpi_operand_object *mutex;
union acpi_operand_object *node;
u8 *aml_start;
union {
acpi_internal_method implementation;
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *root);
/*
* psutils - parser utilities
*/
union acpi_parse_object *acpi_ps_create_scope_op(void);
union acpi_parse_object *acpi_ps_create_scope_op(u8 *aml);

void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);

union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
union acpi_parse_object *acpi_ps_alloc_op(u16 opcode, u8 *aml);

void acpi_ps_free_op(union acpi_parse_object *op);

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct acpi_walk_state {
u8 namespace_override; /* Override existing objects */
u8 result_size; /* Total elements for the result stack */
u8 result_count; /* Current number of occupied elements of result stack */
u32 aml_offset;
u8 *aml;
u32 arg_types;
u32 method_breakpoint; /* For single stepping */
u32 user_breakpoint; /* User AML breakpoint */
Expand Down
23 changes: 11 additions & 12 deletions drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ struct acpi_pkg_info {
#define DB_DWORD_DISPLAY 4
#define DB_QWORD_DISPLAY 8

/*
* utnonansi - Non-ANSI C library functions
*/
void acpi_ut_strupr(char *src_string);

void acpi_ut_strlwr(char *src_string);

int acpi_ut_stricmp(char *string1, char *string2);

acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);

/*
* utglobal - Global data structures and procedures
*/
Expand Down Expand Up @@ -205,8 +216,6 @@ acpi_status acpi_ut_hardware_initialize(void);

void acpi_ut_subsystem_shutdown(void);

#define ACPI_IS_ASCII(c) ((c) < 0x80)

/*
* utcopy - Object construction and conversion interfaces
*/
Expand Down Expand Up @@ -567,16 +576,6 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 **end_tag);
/*
* utstring - String and character utilities
*/
void acpi_ut_strupr(char *src_string);

#ifdef ACPI_ASL_COMPILER
void acpi_ut_strlwr(char *src_string);

int acpi_ut_stricmp(char *string1, char *string2);
#endif

acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);

void acpi_ut_print_string(char *string, u16 max_length);

#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/dsargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,

/* Allocate a new parser op to be the root of the parsed tree */

op = acpi_ps_alloc_op(AML_INT_EVAL_SUBTREE_OP);
op = acpi_ps_alloc_op(AML_INT_EVAL_SUBTREE_OP, aml_start);
if (!op) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
Expand Down Expand Up @@ -129,7 +129,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,

/* Evaluate the deferred arguments */

op = acpi_ps_alloc_op(AML_INT_EVAL_SUBTREE_OP);
op = acpi_ps_alloc_op(AML_INT_EVAL_SUBTREE_OP, aml_start);
if (!op) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
Expand Down
Loading

0 comments on commit 6d63e35

Please sign in to comment.