Skip to content

Commit

Permalink
Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/lenb/linux-acpi-2.6

* 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (27 commits)
  ACPICA: Update version to 20090521.
  ACPICA: Disable preservation of SCI enable bit (SCI_EN)
  ACPICA: Region deletion: Ensure region object is removed from handler list
  ACPICA: Eliminate extra call to NsGetParentNode
  ACPICA: Simplify internal operation region interface
  ACPICA: Update Load() to use operation region interfaces
  ACPICA: New: AcpiInstallMethod - install a single control method
  ACPICA: Invalidate DdbHandle after table unload
  ACPICA: Fix reference count issues for DdbHandle object
  ACPICA: Simplify and optimize NsGetNextNode function
  ACPICA: Additional validation of _PRT packages (resource mgr)
  ACPICA: Fix DebugObject output for DdbHandle objects
  ACPICA: Fix allowable release order for ASL mutex objects
  ACPICA: Mutex support: Fix release ordering issue and current sync level
  ACPICA: Update version to 20090422.
  ACPICA: Linux OSL: cleanup/update/merge
  ACPICA: Fix implementation of AML BreakPoint operator (break to debugger)
  ACPICA: Fix miscellaneous warnings under gcc 4+
  ACPICA: Miscellaneous lint changes
  ACPICA: Fix possible dereference of null pointer
  ...
  • Loading branch information
Linus Torvalds committed Jun 16, 2009
2 parents 46a5066 + d6a1cd4 commit 9bd47bf
Show file tree
Hide file tree
Showing 38 changed files with 571 additions and 198 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ acpi_status acpi_ev_initialize_op_regions(void);
acpi_status
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
u32 function,
acpi_physical_address address,
u32 region_offset,
u32 bit_width, acpi_integer * value);

acpi_status
Expand Down
3 changes: 0 additions & 3 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,6 @@ extern u8 acpi_gbl_method_executing;
extern u8 acpi_gbl_abort_method;
extern u8 acpi_gbl_db_terminate_threads;

ACPI_EXTERN int optind;
ACPI_EXTERN char *optarg;

ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
Expand Down
12 changes: 8 additions & 4 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ struct acpi_namespace_node {
#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */

#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
Expand Down Expand Up @@ -788,11 +789,14 @@ struct acpi_bit_register_info {
/* For control registers, both ignored and reserved bits must be preserved */

/*
* The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0)
* but we need to be able to write ACPI_BITREG_SCI_ENABLE directly
* as a BIOS workaround on some machines.
* For PM1 control, the SCI enable bit (bit 0, SCI_EN) is defined by the
* ACPI specification to be a "preserved" bit - "OSPM always preserves this
* bit position", section 4.7.3.2.1. However, on some machines the OS must
* write a one to this bit after resume for the machine to work properly.
* To enable this, we no longer attempt to preserve this bit. No machines
* are known to fail if the bit is not preserved. (May 2009)
*/
#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200 /* Bits 9 */
#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200 /* Bit 9 */
#define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */
#define ACPI_PM1_CONTROL_PRESERVED_BITS \
(ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
Expand Down
13 changes: 11 additions & 2 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,19 @@ acpi_ns_walk_namespace(acpi_object_type type,
acpi_walk_callback user_function,
void *context, void **return_value);

struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct acpi_namespace_node
*parent, struct acpi_namespace_node
struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node
*parent,
struct acpi_namespace_node
*child);

struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,
struct
acpi_namespace_node
*parent,
struct
acpi_namespace_node
*child);

/*
* nsparse - table parsing
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/amlcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ typedef enum {

#define AML_METHOD_ARG_COUNT 0x07
#define AML_METHOD_SERIALIZED 0x08
#define AML_METHOD_SYNCH_LEVEL 0xF0
#define AML_METHOD_SYNC_LEVEL 0xF0

/* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */

Expand Down
5 changes: 3 additions & 2 deletions drivers/acpi/acpica/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

/* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */

obj_desc->reference.value = opcode - AML_LOCAL_OP;
obj_desc->reference.value =
((u32)opcode) - AML_LOCAL_OP;
obj_desc->reference.class = ACPI_REFCLASS_LOCAL;

#ifndef ACPI_NO_METHOD_EXECUTION
Expand All @@ -754,7 +755,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

/* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */

obj_desc->reference.value = opcode - AML_ARG_OP;
obj_desc->reference.value = ((u32)opcode) - AML_ARG_OP;
obj_desc->reference.class = ACPI_REFCLASS_ARG;

#ifndef ACPI_NO_METHOD_EXECUTION
Expand Down
17 changes: 11 additions & 6 deletions drivers/acpi/acpica/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,14 +1386,19 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,

case AML_BREAK_POINT_OP:

/* Call up to the OS service layer to handle this */

status =
acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,
"Executed AML Breakpoint opcode");
/*
* Set the single-step flag. This will cause the debugger (if present)
* to break to the console within the AML debugger at the start of the
* next AML instruction.
*/
ACPI_DEBUGGER_EXEC(acpi_gbl_cm_single_step = TRUE);
ACPI_DEBUGGER_EXEC(acpi_os_printf
("**break** Executed AML BreakPoint opcode\n"));

/* If and when it returns, all done. */
/* Call to the OSL in case OS wants a piece of the action */

status = acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,
"Executed AML Breakpoint opcode");
break;

case AML_BREAK_OP:
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/dswstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,
/* Return object of the top element and clean that top element result stack */

walk_state->result_count--;
index = walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;
index = (u32)walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;

*object = state->results.obj_desc[index];
if (!*object) {
Expand Down Expand Up @@ -186,7 +186,7 @@ acpi_ds_result_push(union acpi_operand_object * object,

/* Assign the address of object to the top free element of result stack */

index = walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;
index = (u32)walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;
state->results.obj_desc[index] = object;
walk_state->result_count++;

Expand Down
12 changes: 7 additions & 5 deletions drivers/acpi/acpica/evregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
*
* PARAMETERS: region_obj - Internal region object
* Function - Read or Write operation
* Address - Where in the space to read or write
* region_offset - Where in the region to read or write
* bit_width - Field width in bits (8, 16, 32, or 64)
* Value - Pointer to in or out value, must be
* full 64-bit acpi_integer
Expand All @@ -290,7 +290,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
acpi_status
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
u32 function,
acpi_physical_address address,
u32 region_offset,
u32 bit_width, acpi_integer * value)
{
acpi_status status;
Expand Down Expand Up @@ -396,7 +396,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&region_obj->region.handler->address_space, handler,
ACPI_FORMAT_NATIVE_UINT(address),
ACPI_FORMAT_NATIVE_UINT(region_obj->region.address +
region_offset),
acpi_ut_get_region_name(region_obj->region.
space_id)));

Expand All @@ -412,8 +413,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,

/* Call the handler */

status = handler(function, address, bit_width, value,
handler_desc->address_space.context,
status = handler(function,
(region_obj->region.address + region_offset),
bit_width, value, handler_desc->address_space.context,
region_obj2->extra.region_context);

if (ACPI_FAILURE(status)) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/evxfevnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
ACPI_MODULE_NAME("evxfevnt")

/* Local prototypes */
acpi_status
static acpi_status
acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block, void *context);

Expand Down Expand Up @@ -785,7 +785,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_gpe_device)
* block device. NULL if the GPE is one of the FADT-defined GPEs.
*
******************************************************************************/
acpi_status
static acpi_status
acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block, void *context)
{
Expand Down
Loading

0 comments on commit 9bd47bf

Please sign in to comment.