Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica:
  ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead
  ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes
  ACPICA: AML interpreter: add region addresses in global list during initialization
  ACPICA: Update version to 20181003
  ACPICA: Never run _REG on system_memory and system_IO
  ACPICA: Split large interpreter file
  ACPICA: Update for field unit access
  ACPICA: Rename some of the Field Attribute defines
  ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol
  • Loading branch information
rafaeljw committed Oct 18, 2018
2 parents 589edb5 + 08930d5 commit 3c88a88
Show file tree
Hide file tree
Showing 16 changed files with 518 additions and 288 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ acpi-y += \
exresnte.o \
exresolv.o \
exresop.o \
exserial.o \
exstore.o \
exstoren.o \
exstorob.o \
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ acpi_ev_default_region_setup(acpi_handle handle,

acpi_status acpi_ev_initialize_region(union acpi_operand_object *region_obj);

u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node);

/*
* evsci - SCI (System Control Interrupt) handling/dispatch
*/
Expand Down
23 changes: 23 additions & 0 deletions drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ acpi_ex_trace_point(acpi_trace_event_type type,
/*
* exfield - ACPI AML (p-code) execution - field manipulation
*/
acpi_status
acpi_ex_get_protocol_buffer_length(u32 protocol_id, u32 *return_length);

acpi_status
acpi_ex_common_buffer_setup(union acpi_operand_object *obj_desc,
u32 buffer_length, u32 * datum_count);
Expand Down Expand Up @@ -267,6 +270,26 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,

acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info);

/*
* exserial - field_unit support for serial address spaces
*/
acpi_status
acpi_ex_read_serial_bus(union acpi_operand_object *obj_desc,
union acpi_operand_object **return_buffer);

acpi_status
acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
union acpi_operand_object *obj_desc,
union acpi_operand_object **return_buffer);

acpi_status
acpi_ex_read_gpio(union acpi_operand_object *obj_desc, void *buffer);

acpi_status
acpi_ex_write_gpio(union acpi_operand_object *source_desc,
union acpi_operand_object *obj_desc,
union acpi_operand_object **return_buffer);

/*
* exsystem - Interface to OS services
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ struct acpi_simple_repair_info {
/* Info for running the _REG methods */

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

/*****************************************************************************
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/acpica/amlcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ typedef enum {
*/
typedef enum {
AML_FIELD_ATTRIB_QUICK = 0x02,
AML_FIELD_ATTRIB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_SEND_RECEIVE = 0x04,
AML_FIELD_ATTRIB_BYTE = 0x06,
AML_FIELD_ATTRIB_WORD = 0x08,
AML_FIELD_ATTRIB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_MULTIBYTE = 0x0B,
AML_FIELD_ATTRIB_WORD_CALL = 0x0C,
AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D,
AML_FIELD_ATTRIB_BYTES = 0x0B,
AML_FIELD_ATTRIB_PROCESS_CALL = 0x0C,
AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL = 0x0D,
AML_FIELD_ATTRIB_RAW_BYTES = 0x0E,
AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F
AML_FIELD_ATTRIB_RAW_PROCESS_BYTES = 0x0F
} AML_ACCESS_ATTRIBUTE;

/* Bit fields in the AML method_flags byte */
Expand Down
4 changes: 4 additions & 0 deletions drivers/acpi/acpica/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
ACPI_FORMAT_UINT64(obj_desc->region.address),
obj_desc->region.length));

status = acpi_ut_add_address_range(obj_desc->region.space_id,
obj_desc->region.address,
obj_desc->region.length, node);

/* Now the address and length are valid for this opregion */

obj_desc->region.flags |= AOPOBJ_DATA_VALID;
Expand Down
17 changes: 15 additions & 2 deletions drivers/acpi/acpica/evregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,19 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,

ACPI_FUNCTION_TRACE(ev_execute_reg_methods);

/*
* These address spaces do not need a call to _REG, since the ACPI
* specification defines them as: "must always be accessible". Since
* they never change state (never become unavailable), no need to ever
* call _REG on them. Also, a data_table is not a "real" address space,
* so do not call _REG. September 2018.
*/
if ((space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) ||
(space_id == ACPI_ADR_SPACE_SYSTEM_IO) ||
(space_id == ACPI_ADR_SPACE_DATA_TABLE)) {
return_VOID;
}

info.space_id = space_id;
info.function = function;
info.reg_run_count = 0;
Expand Down Expand Up @@ -714,8 +727,8 @@ acpi_ev_reg_run(acpi_handle obj_handle,
}

/*
* We only care about regions.and objects that are allowed to have address
* space handlers
* We only care about regions and objects that are allowed to have
* address space handlers
*/
if ((node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) {
return (AE_OK);
Expand Down
6 changes: 1 addition & 5 deletions drivers/acpi/acpica/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME("evrgnini")

/* Local prototypes */
static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node);

/*******************************************************************************
*
* FUNCTION: acpi_ev_system_memory_region_setup
Expand All @@ -33,7 +30,6 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node);
* DESCRIPTION: Setup a system_memory operation region
*
******************************************************************************/

acpi_status
acpi_ev_system_memory_region_setup(acpi_handle handle,
u32 function,
Expand Down Expand Up @@ -313,7 +309,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
*
******************************************************************************/

static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
{
acpi_status status;
struct acpi_pnp_device_id *hid;
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/acpica/evxfregn.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ acpi_remove_address_space_handler(acpi_handle device,
*/
region_obj =
handler_obj->address_space.region_list;

}

/* Remove this Handler object from the list */
Expand Down
Loading

0 comments on commit 3c88a88

Please sign in to comment.