Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica: (43 commits)
  ACPICA: Drop Linux-specific waking vector functions
  ACPICA: Update version to 20151218
  ACPICA: Add per-table execution of module-level code
  ACPICA: Add "root node" case to the ACPI name repair code
  ACPICA: Events: Introduce ACPI_REG_DISCONNECT invocation to acpi_ev_execute_reg_methods()
  ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages
  ACPICA: Events: Split acpi_ev_associate_reg_method() from region initialization code
  ACPICA: Events: Fix an issue that region object is re-attached to another scope when it is already attached
  ACPICA: Utilities: Reorder initialization code
  ACPICA: Events: Uses common_notify for address space handlers
  ACPICA: Events: Deploys acpi_ev_find_region_handler()
  ACPICA: Cleanup code related to the per-table module level improvement
  ACPICA: Update for CondRefOf and RefOf operators
  ACPICA: Update internal #defines for ObjectType operator. No functional change
  ACPICA: Update parameter type for ObjectType operator
  ACPICA: Parser: Fix for SuperName method invocation
  ACPICA: Parser: Add constants for internal namepath function
  ACPICA: iasl/Disassembler: Support ASL ElseIf operator
  ACPICA: Add new exception code, AE_IO_ERROR
  ACPICA: Tools: Add spacing and missing options in acpibin tool
  ...
  • Loading branch information
Rafael J. Wysocki committed Jan 12, 2016
2 parents 51834d6 + e3e9b57 commit f3a1bca
Show file tree
Hide file tree
Showing 140 changed files with 2,141 additions and 2,228 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ acpi-y += \
exdump.o \
exfield.o \
exfldio.o \
exmisc.o \
exmutex.o \
exnames.o \
exoparg1.o \
exoparg2.o \
exoparg3.o \
exoparg6.o \
exprep.o \
exmisc.o \
exregion.o \
exresnte.o \
exresolv.o \
Expand All @@ -66,6 +66,7 @@ acpi-y += \
exstoren.o \
exstorob.o \
exsystem.o \
extrace.o \
exutils.o

acpi-y += \
Expand Down Expand Up @@ -196,7 +197,6 @@ acpi-$(ACPI_FUTURE_USAGE) += \
dbfileio.o \
dbtest.o \
utcache.o \
utfileio.o \
utprint.o \
uttrack.o \
utuuid.o
Expand Down
58 changes: 32 additions & 26 deletions drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#ifndef _ACAPPS
#define _ACAPPS

#include <stdio.h>

/* Common info for tool signons */

#define ACPICA_NAME "Intel ACPI Component Architecture"
Expand Down Expand Up @@ -85,11 +87,40 @@
acpi_os_printf (description);

#define ACPI_OPTION(name, description) \
acpi_os_printf (" %-18s%s\n", name, description);
acpi_os_printf (" %-20s%s\n", name, description);

/* Check for unexpected exceptions */

#define ACPI_CHECK_STATUS(name, status, expected) \
if (status != expected) \
{ \
acpi_os_printf ("Unexpected %s from %s (%s-%d)\n", \
acpi_format_exception (status), #name, _acpi_module_name, __LINE__); \
}

/* Check for unexpected non-AE_OK errors */

#define ACPI_CHECK_OK(name, status) ACPI_CHECK_STATUS (name, status, AE_OK);

#define FILE_SUFFIX_DISASSEMBLY "dsl"
#define FILE_SUFFIX_BINARY_TABLE ".dat" /* Needs the dot */

/* acfileio */

acpi_status
ac_get_all_tables_from_file(char *filename,
u8 get_only_aml_tables,
struct acpi_new_table_desc **return_list_head);

u8 ac_is_file_binary(FILE * file);

acpi_status ac_validate_table_header(FILE * file, long table_offset);

/* Values for get_only_aml_tables */

#define ACPI_GET_ONLY_AML_TABLES TRUE
#define ACPI_GET_ALL_TABLES FALSE

/*
* getopt
*/
Expand All @@ -107,30 +138,6 @@ extern char *acpi_gbl_optarg;
*/
u32 cm_get_file_size(ACPI_FILE file);

#ifndef ACPI_DUMP_APP
/*
* adisasm
*/
acpi_status
ad_aml_disassemble(u8 out_to_file,
char *filename, char *prefix, char **out_filename);

void ad_print_statistics(void);

acpi_status ad_find_dsdt(u8 **dsdt_ptr, u32 *dsdt_length);

void ad_dump_tables(void);

acpi_status ad_get_local_tables(void);

acpi_status
ad_parse_table(struct acpi_table_header *table,
acpi_owner_id * owner_id, u8 load_table, u8 external);

acpi_status ad_display_tables(char *filename, struct acpi_table_header *table);

acpi_status ad_display_statistics(void);

/*
* adwalk
*/
Expand Down Expand Up @@ -168,6 +175,5 @@ char *ad_generate_filename(char *prefix, char *table_id);
void
ad_write_table(struct acpi_table_header *table,
u32 length, char *table_name, char *oem_table_id);
#endif

#endif /* _ACAPPS */
5 changes: 1 addition & 4 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,7 @@ void acpi_db_open_debug_file(char *name);

acpi_status acpi_db_load_acpi_table(char *filename);

acpi_status
acpi_db_get_table_from_file(char *filename,
struct acpi_table_header **table,
u8 must_be_aml_table);
acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head);

/*
* dbhistry - debugger HISTORY command
Expand Down
11 changes: 9 additions & 2 deletions drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
/*
* evhandler - Address space handling
*/
union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type
space_id,
union acpi_operand_object
*handler_obj);

u8
acpi_ev_has_default_handler(struct acpi_namespace_node *node,
acpi_adr_space_type space_id);
Expand Down Expand Up @@ -193,9 +198,11 @@ void
acpi_ev_detach_region(union acpi_operand_object *region_obj,
u8 acpi_ns_is_locked);

acpi_status
void acpi_ev_associate_reg_method(union acpi_operand_object *region_obj);

void
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
acpi_adr_space_type space_id);
acpi_adr_space_type space_id, u32 function);

acpi_status
acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function);
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_operand_cache);

ACPI_INIT_GLOBAL(u32, acpi_gbl_startup_flags, 0);
ACPI_INIT_GLOBAL(u8, acpi_gbl_shutdown, TRUE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_early_initialization, TRUE);

/* Global handlers */

Expand All @@ -164,7 +165,7 @@ ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);

/* Initialization sequencing */

ACPI_GLOBAL(u8, acpi_gbl_reg_methods_executed);
ACPI_INIT_GLOBAL(u8, acpi_gbl_reg_methods_enabled, FALSE);

/* Misc */

Expand Down
12 changes: 11 additions & 1 deletion drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ struct acpi_table_list {
#define ACPI_ROOT_ORIGIN_ALLOCATED (1)
#define ACPI_ROOT_ALLOW_RESIZE (2)

/* List to manage incoming ACPI tables */

struct acpi_new_table_desc {
struct acpi_table_header *table;
struct acpi_new_table_desc *next;
};

/* Predefined table indexes */

#define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF)
Expand Down Expand Up @@ -388,7 +395,8 @@ union acpi_predefined_info {

/* Return object auto-repair info */

typedef acpi_status(*acpi_object_converter) (union acpi_operand_object
typedef acpi_status(*acpi_object_converter) (struct acpi_namespace_node * scope,
union acpi_operand_object
*original_object,
union acpi_operand_object
**converted_object);
Expand Down Expand Up @@ -420,6 +428,7 @@ struct acpi_simple_repair_info {

struct acpi_reg_walk_info {
acpi_adr_space_type space_id;
u32 function;
u32 reg_run_count;
};

Expand Down Expand Up @@ -861,6 +870,7 @@ struct acpi_parse_state {
#define ACPI_PARSEOP_CLOSING_PAREN 0x10
#define ACPI_PARSEOP_COMPOUND 0x20
#define ACPI_PARSEOP_ASSIGNMENT 0x40
#define ACPI_PARSEOP_ELSEIF 0x80

/*****************************************************************************
*
Expand Down
12 changes: 10 additions & 2 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
/* Object is not a package element */

#define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
#define ACPI_ALL_PACKAGE_ELEMENTS (ACPI_UINT32_MAX-1)

/* Always emit warning message, not dependent on node flags */

Expand Down Expand Up @@ -183,13 +184,20 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

acpi_status
acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

acpi_status
acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

acpi_status
acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,
union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

/*
* nsdump - Namespace dump/print utilities
*/
Expand Down
7 changes: 4 additions & 3 deletions drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@
#define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */
#define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */
#define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */
#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized, _REG was run */
#define AOPOBJ_SETUP_COMPLETE 0x10 /* Region setup is complete */
#define AOPOBJ_INVALID 0x20 /* Host OS won't allow a Region address */
#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */
#define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */
#define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */
#define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */

/******************************************************************************
*
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/acpica/acopcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING)
#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_NAME_OR_REF,ARGP_TARGET)
#define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
#define ARGP_CONTINUE_OP ARG_NONE
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
Expand Down Expand Up @@ -152,13 +152,14 @@
#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING)
#define ARGP_NOOP_OP ARG_NONE
#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
#define ARGP_OBJECT_TYPE_OP ARGP_LIST1 (ARGP_NAME_OR_REF)
#define ARGP_ONE_OP ARG_NONE
#define ARGP_ONES_OP ARG_NONE
#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST)
#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST)
#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_NAME_OR_REF)
#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
Expand All @@ -185,7 +186,6 @@
#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST)
#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
Expand Down Expand Up @@ -223,7 +223,7 @@
#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_ANYTYPE, ARGI_ANYTYPE, ARGI_TARGETREF)
#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
#define ARGI_CONNECTFIELD_OP ARGI_INVALID_OPCODE
Expand Down Expand Up @@ -285,6 +285,7 @@
#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE
#define ARGI_NOOP_OP ARG_NONE
#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
#define ARGI_OBJECT_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
#define ARGI_ONE_OP ARG_NONE
#define ARGI_ONES_OP ARG_NONE
#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
Expand Down Expand Up @@ -318,7 +319,6 @@
#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
Expand Down
8 changes: 7 additions & 1 deletion drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
acpi_status
acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state,
union acpi_parse_object *arg, u8 method_call);
union acpi_parse_object *arg,
u8 possible_method_call);

/* Values for u8 above */

#define ACPI_NOT_METHOD_CALL FALSE
#define ACPI_POSSIBLE_METHOD_CALL TRUE

acpi_status
acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
Expand Down
26 changes: 7 additions & 19 deletions drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,24 +184,24 @@ acpi_status acpi_ut_init_globals(void);

#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)

char *acpi_ut_get_mutex_name(u32 mutex_id);
const char *acpi_ut_get_mutex_name(u32 mutex_id);

const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type);
#endif

char *acpi_ut_get_type_name(acpi_object_type type);
const char *acpi_ut_get_type_name(acpi_object_type type);

char *acpi_ut_get_node_name(void *object);
const char *acpi_ut_get_node_name(void *object);

char *acpi_ut_get_descriptor_name(void *object);
const char *acpi_ut_get_descriptor_name(void *object);

const char *acpi_ut_get_reference_name(union acpi_operand_object *object);

char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
const char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);

char *acpi_ut_get_region_name(u8 space_id);
const char *acpi_ut_get_region_name(u8 space_id);

char *acpi_ut_get_event_name(u32 event_id);
const char *acpi_ut_get_event_name(u32 event_id);

char acpi_ut_hex_to_ascii_char(u64 integer, u32 position);

Expand Down Expand Up @@ -352,14 +352,6 @@ acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node,
const char **method_names,
u8 method_count, u8 *out_values);

/*
* utfileio - file operations
*/
#ifdef ACPI_APPLICATION
acpi_status
acpi_ut_read_table_from_file(char *filename, struct acpi_table_header **table);
#endif

/*
* utids - device ID support
*/
Expand All @@ -371,10 +363,6 @@ acpi_status
acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
struct acpi_pnp_device_id ** return_id);

acpi_status
acpi_ut_execute_SUB(struct acpi_namespace_node *device_node,
struct acpi_pnp_device_id **return_id);

acpi_status
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
struct acpi_pnp_device_id_list ** return_cid_list);
Expand Down
Loading

0 comments on commit f3a1bca

Please sign in to comment.