Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica: (33 commits)
  ACPICA: Update version to 20130328
  ACPICA: Add a lock to the internal object reference count mechanism
  ACPICA: Fix a format string for 64-bit generation
  ACPICA: Remove FORCE_DELETE option for global reference count mechanism
  ACPICA: Improve error message for Index() operator
  ACPICA: FADT: Remove extraneous warning for very large GPE registers
  ACPICA: Fix a typo in a function header, no functional change
  ACPICA: Fix a typo in an error message
  ACPICA: Fix for some comments/headers
  ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex()
  ACPICA: Predefine names: Add allowed argument types to master info table
  ACPI: Set length even for TYPE_END_TAG acpi resource
  ACPICA: Update version to 20130214
  ACPICA: Object repair: Allow 0-length packages for variable-length packages
  ACPICA: Disassembler: Add warnings for unresolved control methods
  ACPICA: Return object repair: Add resource template repairs
  ACPICA: Return object repair: Add string-to-unicode conversion
  ACPICA: Split object conversion functions to a new file
  ACPICA: Add mechanism for early object repairs on a per-name basis
  ACPICA: Remove trailing comma in enum declarations
  ...
  • Loading branch information
Rafael J. Wysocki committed Apr 27, 2013
2 parents 2467d7b + 8ee88d5 commit 0ad4991
Show file tree
Hide file tree
Showing 50 changed files with 2,697 additions and 1,189 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
acpi-y += \
nsaccess.o \
nsalloc.o \
nsconvert.o \
nsdump.o \
nseval.o \
nsinit.o \
Expand Down Expand Up @@ -160,6 +161,7 @@ acpi-y += \
utobject.o \
utosi.o \
utownerid.o \
utpredef.o \
utresrc.o \
utstate.o \
utstring.o \
Expand Down
5 changes: 4 additions & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pending;
*/
ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */
ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
ACPI_EXTERN acpi_spinlock acpi_gbl_reference_count_lock;

/* Mutex for _OSI support */

Expand Down Expand Up @@ -413,10 +414,12 @@ ACPI_EXTERN u8 acpi_gbl_db_output_flags;

#ifdef ACPI_DISASSEMBLER

u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_noop_operator, FALSE);
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_noop_operator, FALSE);

ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
ACPI_EXTERN u8 acpi_gbl_num_external_methods;
ACPI_EXTERN u32 acpi_gbl_resolved_external_methods;
ACPI_EXTERN struct acpi_external_list *acpi_gbl_external_list;
ACPI_EXTERN struct acpi_external_file *acpi_gbl_external_file_list;
#endif
Expand Down
29 changes: 26 additions & 3 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ acpi_status(*acpi_internal_method) (struct acpi_walk_state * walk_state);
#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */
#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF

#pragma pack(1)

/*
* Information structure for ACPI predefined names.
* Each entry in the table contains the following items:
Expand All @@ -304,7 +306,7 @@ acpi_status(*acpi_internal_method) (struct acpi_walk_state * walk_state);
*/
struct acpi_name_info {
char name[ACPI_NAME_SIZE];
u8 param_count;
u16 argument_list;
u8 expected_btypes;
};

Expand All @@ -327,7 +329,7 @@ struct acpi_package_info {
u8 count1;
u8 object_type2;
u8 count2;
u8 reserved;
u16 reserved;
};

/* Used for ACPI_PTYPE2_FIXED */
Expand All @@ -336,6 +338,7 @@ struct acpi_package_info2 {
u8 type;
u8 count;
u8 object_type[4];
u8 reserved;
};

/* Used for ACPI_PTYPE1_OPTION */
Expand All @@ -345,7 +348,7 @@ struct acpi_package_info3 {
u8 count;
u8 object_type[2];
u8 tail_object_type;
u8 reserved;
u16 reserved;
};

union acpi_predefined_info {
Expand All @@ -355,6 +358,10 @@ union acpi_predefined_info {
struct acpi_package_info3 ret_info3;
};

/* Reset to default packing */

#pragma pack()

/* Data block used during object validation */

struct acpi_predefined_data {
Expand All @@ -363,6 +370,7 @@ struct acpi_predefined_data {
union acpi_operand_object *parent_package;
struct acpi_namespace_node *node;
u32 flags;
u32 return_btype;
u8 node_flags;
};

Expand All @@ -371,6 +379,20 @@ struct acpi_predefined_data {
#define ACPI_OBJECT_REPAIRED 1
#define ACPI_OBJECT_WRAPPED 2

/* Return object auto-repair info */

typedef acpi_status(*acpi_object_converter) (union acpi_operand_object
*original_object,
union acpi_operand_object
**converted_object);

struct acpi_simple_repair_info {
char name[ACPI_NAME_SIZE];
u32 unexpected_btypes;
u32 package_index;
acpi_object_converter object_converter;
};

/*
* Bitmapped return value types
* Note: the actual data types must be contiguous, a loop in nspredef.c
Expand Down Expand Up @@ -1037,6 +1059,7 @@ struct acpi_external_list {
u16 length;
u8 type;
u8 flags;
u8 resolved;
};

/* Values for Flags field above */
Expand Down
6 changes: 4 additions & 2 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,12 @@
* where a pointer to an object of type union acpi_operand_object can also
* appear. This macro is used to distinguish them.
*
* The "Descriptor" field is the first field in both structures.
* The "DescriptorType" field is the second field in both structures.
*/
#define ACPI_GET_DESCRIPTOR_PTR(d) (((union acpi_descriptor *)(void *)(d))->common.common_pointer)
#define ACPI_SET_DESCRIPTOR_PTR(d, p) (((union acpi_descriptor *)(void *)(d))->common.common_pointer = (p))
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = (t))

/*
* Macros for the master AML opcode table
Expand Down
29 changes: 24 additions & 5 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,29 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent);

int acpi_ns_compare_names(char *name1, char *name2);

/*
* nsconvert - Dynamic object conversion routines
*/
acpi_status
acpi_ns_convert_to_integer(union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

acpi_status
acpi_ns_convert_to_string(union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

acpi_status
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,
union acpi_operand_object **return_object);

acpi_status
acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
union acpi_operand_object **return_object);

/*
* nsdump - Namespace dump/print utilities
*/
Expand Down Expand Up @@ -208,10 +231,6 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
acpi_status return_status,
union acpi_operand_object **return_object);

const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
acpi_namespace_node
*node);

void
acpi_ns_check_parameter_count(char *pathname,
struct acpi_namespace_node *node,
Expand Down Expand Up @@ -289,7 +308,7 @@ acpi_ns_get_attached_data(struct acpi_namespace_node *node,
* predefined methods/objects
*/
acpi_status
acpi_ns_repair_object(struct acpi_predefined_data *data,
acpi_ns_simple_repair(struct acpi_predefined_data *data,
u32 expected_btypes,
u32 package_index,
union acpi_operand_object **return_object_ptr);
Expand Down
Loading

0 comments on commit 0ad4991

Please sign in to comment.