Skip to content

Commit

Permalink
Merge branch 'acpica' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
lenb committed Sep 19, 2009
2 parents d093d70 + c976623 commit 985f387
Show file tree
Hide file tree
Showing 68 changed files with 4,026 additions and 2,169 deletions.
7 changes: 2 additions & 5 deletions arch/ia64/hp/common/sba_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2026,24 +2026,21 @@ acpi_sba_ioc_add(struct acpi_device *device)
struct ioc *ioc;
acpi_status status;
u64 hpa, length;
struct acpi_buffer buffer;
struct acpi_device_info *dev_info;

status = hp_acpi_csr_space(device->handle, &hpa, &length);
if (ACPI_FAILURE(status))
return 1;

buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
status = acpi_get_object_info(device->handle, &buffer);
status = acpi_get_object_info(device->handle, &dev_info);
if (ACPI_FAILURE(status))
return 1;
dev_info = buffer.pointer;

/*
* For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI
* root bridges, and its CSR space includes the IOC function.
*/
if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) {
if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) {
hpa += ZX1_IOC_OFFSET;
/* zx1 based systems default to kernel page size iommu pages */
if (!iovp_shift)
Expand Down
11 changes: 4 additions & 7 deletions drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,26 +481,23 @@ static acpi_status is_memory_device(acpi_handle handle)
{
char *hardware_id;
acpi_status status;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_device_info *info;


status = acpi_get_object_info(handle, &buffer);
status = acpi_get_object_info(handle, &info);
if (ACPI_FAILURE(status))
return status;

info = buffer.pointer;
if (!(info->valid & ACPI_VALID_HID)) {
kfree(buffer.pointer);
kfree(info);
return AE_ERROR;
}

hardware_id = info->hardware_id.value;
hardware_id = info->hardware_id.string;
if ((hardware_id == NULL) ||
(strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID)))
status = AE_ERROR;

kfree(buffer.pointer);
kfree(info);
return status;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \
nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \
nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \
nsparse.o nspredef.o
nsparse.o nspredef.o nsrepair.o

acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o

Expand All @@ -44,4 +44,4 @@ acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o

acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
utstate.o utmutex.o utobject.o utresrc.o utlock.o
utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o
10 changes: 8 additions & 2 deletions drivers/acpi/acpica/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@

/* Operation regions */

#define ACPI_NUM_PREDEFINED_REGIONS 8
#define ACPI_NUM_PREDEFINED_REGIONS 9
#define ACPI_USER_REGION_BEGIN 0x80

/* Maximum space_ids for Operation Regions */
Expand All @@ -199,9 +199,15 @@
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_XCHECKSUM_LENGTH 36

/* SMBus bidirectional buffer size */
/* SMBus and IPMI bidirectional buffer size */

#define ACPI_SMBUS_BUFFER_SIZE 34
#define ACPI_IPMI_BUFFER_SIZE 66

/* _sx_d and _sx_w control methods */

#define ACPI_NUM_sx_d_METHODS 4
#define ACPI_NUM_sx_w_METHODS 5

/******************************************************************************
*
Expand Down
4 changes: 0 additions & 4 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ void
acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void acpi_db_check_predefined_names(void);

void acpi_db_batch_execute(void);

/*
* dbexec - debugger control method execution
*/
Expand Down
37 changes: 21 additions & 16 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
#define ACPI_INIT_GLOBAL(a,b) a
#endif

#ifdef DEFINE_ACPI_GLOBALS

/* Public globals, available from outside ACPICA subsystem */

/*****************************************************************************
*
* Runtime configuration (static defaults that can be overriden at runtime)
Expand All @@ -78,47 +82,51 @@
* 5) Allow unresolved references (invalid target name) in package objects
* 6) Enable warning messages for behavior that is not ACPI spec compliant
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);

/*
* Automatically serialize ALL control methods? Default is FALSE, meaning
* to use the Serialized/not_serialized method flags on a per method basis.
* Only change this if the ASL code is poorly written and cannot handle
* reentrancy even though methods are marked "NotSerialized".
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);

/*
* Create the predefined _OSI method in the namespace? Default is TRUE
* because ACPI CA is fully compatible with other ACPI implementations.
* Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);

/*
* Disable wakeup GPEs during runtime? Default is TRUE because WAKE and
* RUNTIME GPEs should never be shared, and WAKE GPEs should typically only
* be enabled just before going to sleep.
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);

/*
* Optionally use default values for the ACPI register widths. Set this to
* TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);

/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */

struct acpi_table_fadt acpi_gbl_FADT;
u32 acpi_current_gpe_count;
u32 acpi_gbl_trace_flags;
acpi_name acpi_gbl_trace_method_name;

#endif

/*****************************************************************************
*
* Debug support
*
****************************************************************************/

/* Runtime configuration of debug print levels */

extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;

/* Procedure nesting level for debug output */

extern u32 acpi_gbl_nesting_level;
Expand All @@ -127,10 +135,8 @@ extern u32 acpi_gbl_nesting_level;

ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
ACPI_EXTERN acpi_name acpi_gbl_trace_method_name;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
ACPI_EXTERN u32 acpi_gbl_trace_flags;

/*****************************************************************************
*
Expand All @@ -142,10 +148,8 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
* acpi_gbl_root_table_list is the master list of ACPI tables found in the
* RSDT/XSDT.
*
* acpi_gbl_FADT is a local copy of the FADT, converted to a common format.
*/
ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS;

/* These addresses are calculated from the FADT Event Block addresses */
Expand Down Expand Up @@ -261,7 +265,8 @@ ACPI_EXTERN u8 acpi_gbl_osi_data;
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
extern const char *acpi_gbl_highest_dstate_names[4];
extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS];
extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS];
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];

Expand Down Expand Up @@ -290,6 +295,7 @@ extern char const *acpi_gbl_exception_names_ctrl[];
ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device;
ACPI_EXTERN union acpi_operand_object *acpi_gbl_module_code_list;

extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES];
extern const struct acpi_predefined_names
Expand Down Expand Up @@ -340,7 +346,6 @@ ACPI_EXTERN struct acpi_fixed_event_handler
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
ACPI_EXTERN struct acpi_gpe_block_info
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
ACPI_EXTERN u32 acpi_current_gpe_count;

/*****************************************************************************
*
Expand Down
8 changes: 8 additions & 0 deletions drivers/acpi/acpica/achware.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ u32 acpi_hw_get_mode(void);
/*
* hwregs - ACPI Register I/O
*/
acpi_status
acpi_hw_validate_register(struct acpi_generic_address *reg,
u8 max_bit_width, u64 *address);

acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg);

acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg);

struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id);

acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control);
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ void acpi_ex_acquire_global_lock(u32 rule);

void acpi_ex_release_global_lock(u32 rule);

void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string);
void acpi_ex_eisa_id_to_string(char *dest, acpi_integer compressed_id);

void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string);
void acpi_ex_integer_to_string(char *dest, acpi_integer value);

/*
* exregion - default op_region handlers
Expand Down
16 changes: 16 additions & 0 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,19 @@ union acpi_predefined_info {
struct acpi_package_info3 ret_info3;
};

/* Data block used during object validation */

struct acpi_predefined_data {
char *pathname;
const union acpi_predefined_info *predefined;
u32 flags;
u8 node_flags;
};

/* Defines for Flags field above */

#define ACPI_OBJECT_REPAIRED 1

/*
* Bitmapped return value types
* Note: the actual data types must be contiguous, a loop in nspredef.c
Expand Down Expand Up @@ -885,6 +898,9 @@ struct acpi_bit_register_info {
#define ACPI_OSI_WIN_XP_SP2 0x05
#define ACPI_OSI_WINSRV_2003_SP1 0x06
#define ACPI_OSI_WIN_VISTA 0x07
#define ACPI_OSI_WINSRV_2008 0x08
#define ACPI_OSI_WIN_VISTA_SP1 0x09
#define ACPI_OSI_WIN_7 0x0A

#define ACPI_ALWAYS_ILLEGAL 0x00

Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,15 @@
*/
#define ACPI_ERROR_NAMESPACE(s, e) acpi_ns_report_error (AE_INFO, s, e);
#define ACPI_ERROR_METHOD(s, n, p, e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);
#define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist

#else

/* No error messages */

#define ACPI_ERROR_NAMESPACE(s, e)
#define ACPI_ERROR_METHOD(s, n, p, e)
#define ACPI_WARN_PREDEFINED(plist)
#endif /* ACPI_NO_ERROR_MESSAGES */

/*
Expand Down
25 changes: 25 additions & 0 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
#define ACPI_NS_WALK_UNLOCK 0x01
#define ACPI_NS_WALK_TEMP_NODES 0x02

/* Object is not a package element */

#define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX

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

#define ACPI_WARN_ALWAYS 0

/*
* nsinit - Namespace initialization
*/
Expand Down Expand Up @@ -144,6 +152,8 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name);

void acpi_ns_delete_node(struct acpi_namespace_node *node);

void acpi_ns_remove_node(struct acpi_namespace_node *node);

void
acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);

Expand Down Expand Up @@ -186,6 +196,8 @@ acpi_ns_dump_objects(acpi_object_type type,
*/
acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);

void acpi_ns_exec_module_code_list(void);

/*
* nspredef - Support for predefined/reserved names
*/
Expand Down Expand Up @@ -259,6 +271,19 @@ acpi_status
acpi_ns_get_attached_data(struct acpi_namespace_node *node,
acpi_object_handler handler, void **data);

/*
* nsrepair - return object repair for predefined methods/objects
*/
acpi_status
acpi_ns_repair_object(struct acpi_predefined_data *data,
u32 expected_btypes,
u32 package_index,
union acpi_operand_object **return_object_ptr);

acpi_status
acpi_ns_repair_package_list(struct acpi_predefined_data *data,
union acpi_operand_object **obj_desc_ptr);

/*
* nssearch - Namespace searching and entry
*/
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 @@ -98,6 +98,7 @@
#define AOPOBJ_SETUP_COMPLETE 0x10
#define AOPOBJ_SINGLE_DATUM 0x20
#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */
#define AOPOBJ_MODULE_LEVEL 0x80

/******************************************************************************
*
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#define ACPI_PARSE_DEFERRED_OP 0x0100
#define ACPI_PARSE_DISASSEMBLE 0x0200

#define ACPI_PARSE_MODULE_LEVEL 0x0400

/******************************************************************************
*
* Parser interfaces
Expand Down
Loading

0 comments on commit 985f387

Please sign in to comment.