Commit d4eb4155 authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents d9bfacba ea82155a
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/device.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#ifdef CONFIG_X86 #ifdef CONFIG_X86
#include <asm/mpspec.h> #include <asm/mpspec.h>
......
/****************************************************************************** /******************************************************************************
* *
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing * Module Name: dsmethod - Parser/Interpreter interface - control method parsing
* $Revision: 88 $ * $Revision: 89 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -216,7 +216,7 @@ acpi_ds_begin_method_execution ( ...@@ -216,7 +216,7 @@ acpi_ds_begin_method_execution (
* interpreter if we block * interpreter if we block
*/ */
status = acpi_ex_system_wait_semaphore (obj_desc->method.semaphore, status = acpi_ex_system_wait_semaphore (obj_desc->method.semaphore,
WAIT_FOREVER); ACPI_WAIT_FOREVER);
} }
/* /*
......
/****************************************************************************** /******************************************************************************
* *
* Module Name: dswstate - Dispatcher parse tree walk management routines * Module Name: dswstate - Dispatcher parse tree walk management routines
* $Revision: 69 $ * $Revision: 70 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -345,7 +345,7 @@ acpi_ds_result_push ( ...@@ -345,7 +345,7 @@ acpi_ds_result_push (
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Push an object onto the Walk_state result stack.
* *
******************************************************************************/ ******************************************************************************/
...@@ -381,7 +381,7 @@ acpi_ds_result_stack_push ( ...@@ -381,7 +381,7 @@ acpi_ds_result_stack_push (
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Pop an object off of the Walk_state result stack.
* *
******************************************************************************/ ******************************************************************************/
......
/****************************************************************************** /******************************************************************************
* *
* Module Name: evmisc - Miscellaneous event manager support functions * Module Name: evmisc - Miscellaneous event manager support functions
* $Revision: 57 $ * $Revision: 58 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -433,7 +433,7 @@ acpi_ev_init_global_lock_handler (void) ...@@ -433,7 +433,7 @@ acpi_ev_init_global_lock_handler (void)
acpi_status acpi_status
acpi_ev_acquire_global_lock ( acpi_ev_acquire_global_lock (
u32 timeout) u16 timeout)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
u8 acquired = FALSE; u8 acquired = FALSE;
......
/****************************************************************************** /******************************************************************************
* *
* Module Name: evxface - External interfaces for ACPI events * Module Name: evxface - External interfaces for ACPI events
* $Revision: 131 $ * $Revision: 132 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -612,7 +612,7 @@ acpi_remove_gpe_handler ( ...@@ -612,7 +612,7 @@ acpi_remove_gpe_handler (
acpi_status acpi_status
acpi_acquire_global_lock ( acpi_acquire_global_lock (
u32 timeout, u16 timeout,
u32 *handle) u32 *handle)
{ {
acpi_status status; acpi_status status;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Module Name: exsystem - Interface to OS services * Module Name: exsystem - Interface to OS services
* $Revision: 73 $ * $Revision: 74 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
acpi_status acpi_status
acpi_ex_system_wait_semaphore ( acpi_ex_system_wait_semaphore (
acpi_handle semaphore, acpi_handle semaphore,
u32 timeout) u16 timeout)
{ {
acpi_status status; acpi_status status;
acpi_status status2; acpi_status status2;
...@@ -201,12 +201,12 @@ acpi_ex_system_acquire_mutex ( ...@@ -201,12 +201,12 @@ acpi_ex_system_acquire_mutex (
* Support for the _GL_ Mutex object -- go get the global lock * Support for the _GL_ Mutex object -- go get the global lock
*/ */
if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) {
status = acpi_ev_acquire_global_lock ((u32) time_desc->integer.value); status = acpi_ev_acquire_global_lock ((u16) time_desc->integer.value);
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
status = acpi_ex_system_wait_semaphore (obj_desc->mutex.semaphore, status = acpi_ex_system_wait_semaphore (obj_desc->mutex.semaphore,
(u32) time_desc->integer.value); (u16) time_desc->integer.value);
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -312,7 +312,7 @@ acpi_ex_system_wait_event ( ...@@ -312,7 +312,7 @@ acpi_ex_system_wait_event (
if (obj_desc) { if (obj_desc) {
status = acpi_ex_system_wait_semaphore (obj_desc->event.semaphore, status = acpi_ex_system_wait_semaphore (obj_desc->event.semaphore,
(u32) time_desc->integer.value); (u16) time_desc->integer.value);
} }
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Module Name: exutils - interpreter/scanner utilities * Module Name: exutils - interpreter/scanner utilities
* $Revision: 105 $ * $Revision: 106 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -189,7 +189,7 @@ acpi_ex_acquire_global_lock ( ...@@ -189,7 +189,7 @@ acpi_ex_acquire_global_lock (
if (field_flags & AML_FIELD_LOCK_RULE_MASK) { if (field_flags & AML_FIELD_LOCK_RULE_MASK) {
/* We should attempt to get the lock, wait forever */ /* We should attempt to get the lock, wait forever */
status = acpi_ev_acquire_global_lock (ACPI_UINT32_MAX); status = acpi_ev_acquire_global_lock (ACPI_WAIT_FOREVER);
if (ACPI_SUCCESS (status)) { if (ACPI_SUCCESS (status)) {
locked = TRUE; locked = TRUE;
} }
......
/****************************************************************************** /******************************************************************************
* *
* Name: acevents.h - Event subcomponent prototypes and defines * Name: acevents.h - Event subcomponent prototypes and defines
* $Revision: 79 $ * $Revision: 80 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -63,7 +63,7 @@ acpi_ev_is_notify_object ( ...@@ -63,7 +63,7 @@ acpi_ev_is_notify_object (
acpi_status acpi_status
acpi_ev_acquire_global_lock( acpi_ev_acquire_global_lock(
u32 timeout); u16 timeout);
acpi_status acpi_status
acpi_ev_release_global_lock( acpi_ev_release_global_lock(
......
/****************************************************************************** /******************************************************************************
* *
* Name: acinterp.h - Interpreter subcomponent prototypes and defines * Name: acinterp.h - Interpreter subcomponent prototypes and defines
* $Revision: 140 $ * $Revision: 141 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -377,7 +377,7 @@ acpi_ex_system_reset_event( ...@@ -377,7 +377,7 @@ acpi_ex_system_reset_event(
acpi_status acpi_status
acpi_ex_system_wait_semaphore ( acpi_ex_system_wait_semaphore (
acpi_handle semaphore, acpi_handle semaphore,
u32 timeout); u16 timeout);
/* /*
......
/****************************************************************************** /******************************************************************************
* *
* Name: aclocal.h - Internal data types used across the ACPI subsystem * Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 178 $ * $Revision: 179 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define __ACLOCAL_H__ #define __ACLOCAL_H__
#define WAIT_FOREVER ((u32) -1) #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
typedef void* acpi_mutex; typedef void* acpi_mutex;
typedef u32 ACPI_MUTEX_HANDLE; typedef u32 ACPI_MUTEX_HANDLE;
......
...@@ -117,7 +117,7 @@ acpi_status ...@@ -117,7 +117,7 @@ acpi_status
acpi_os_wait_semaphore ( acpi_os_wait_semaphore (
acpi_handle handle, acpi_handle handle,
u32 units, u32 units,
u32 timeout); u16 timeout);
acpi_status acpi_status
acpi_os_signal_semaphore ( acpi_os_signal_semaphore (
......
...@@ -281,7 +281,7 @@ acpi_install_gpe_handler ( ...@@ -281,7 +281,7 @@ acpi_install_gpe_handler (
acpi_status acpi_status
acpi_acquire_global_lock ( acpi_acquire_global_lock (
u32 timeout, u16 timeout,
u32 *handle); u32 *handle);
acpi_status acpi_status
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* Module Name: nsobject - Utilities for objects attached to namespace * Module Name: nsobject - Utilities for objects attached to namespace
* table entries * table entries
* $Revision: 84 $ * $Revision: 85 $
* *
******************************************************************************/ ******************************************************************************/
...@@ -173,13 +173,13 @@ acpi_ns_attach_object ( ...@@ -173,13 +173,13 @@ acpi_ns_attach_object (
* *
* FUNCTION: Acpi_ns_detach_object * FUNCTION: Acpi_ns_detach_object
* *
* PARAMETERS: Node - An object whose Value will be deleted * PARAMETERS: Node - An node whose object will be detached
* *
* RETURN: None. * RETURN: None.
* *
* DESCRIPTION: Delete the Value associated with a namespace object. If the * DESCRIPTION: Detach/delete an object associated with a namespace node.
* Value is an allocated object, it is freed. Otherwise, the * if the object is an allocated object, it is freed.
* field is simply cleared. * Otherwise, the field is simply cleared.
* *
******************************************************************************/ ******************************************************************************/
...@@ -234,6 +234,8 @@ acpi_ns_detach_object ( ...@@ -234,6 +234,8 @@ acpi_ns_detach_object (
* RETURN: Current value of the object field from the Node whose * RETURN: Current value of the object field from the Node whose
* handle is passed * handle is passed
* *
* DESCRIPTION: Obtain the object attached to a namespace node.
*
******************************************************************************/ ******************************************************************************/
acpi_operand_object * acpi_operand_object *
...@@ -266,7 +268,9 @@ acpi_ns_get_attached_object ( ...@@ -266,7 +268,9 @@ acpi_ns_get_attached_object (
* PARAMETERS: Node - Parent Node to be examined * PARAMETERS: Node - Parent Node to be examined
* *
* RETURN: Current value of the object field from the Node whose * RETURN: Current value of the object field from the Node whose
* handle is passed * handle is passed.
*
* DESCRIPTION: Obtain a secondary object associated with a namespace node.
* *
******************************************************************************/ ******************************************************************************/
...@@ -292,11 +296,13 @@ acpi_ns_get_secondary_object ( ...@@ -292,11 +296,13 @@ acpi_ns_get_secondary_object (
* *
* FUNCTION: Acpi_ns_attach_data * FUNCTION: Acpi_ns_attach_data
* *
* PARAMETERS: * PARAMETERS: Node - Namespace node
* Handler - Handler to be associated with the data
* Data - Data to be attached
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Low-level attach data. Create and attach a Data object.
* *
******************************************************************************/ ******************************************************************************/
...@@ -311,7 +317,8 @@ acpi_ns_attach_data ( ...@@ -311,7 +317,8 @@ acpi_ns_attach_data (
acpi_operand_object *data_desc; acpi_operand_object *data_desc;
/* */ /* We only allow one attachment per handler */
prev_obj_desc = NULL; prev_obj_desc = NULL;
obj_desc = node->object; obj_desc = node->object;
while (obj_desc) { while (obj_desc) {
...@@ -324,7 +331,6 @@ acpi_ns_attach_data ( ...@@ -324,7 +331,6 @@ acpi_ns_attach_data (
obj_desc = obj_desc->common.next_object; obj_desc = obj_desc->common.next_object;
} }
/* Create an internal object for the data */ /* Create an internal object for the data */
data_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_DATA); data_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_DATA);
...@@ -335,7 +341,6 @@ acpi_ns_attach_data ( ...@@ -335,7 +341,6 @@ acpi_ns_attach_data (
data_desc->data.handler = handler; data_desc->data.handler = handler;
data_desc->data.pointer = data; data_desc->data.pointer = data;
/* Install the data object */ /* Install the data object */
if (prev_obj_desc) { if (prev_obj_desc) {
...@@ -353,11 +358,13 @@ acpi_ns_attach_data ( ...@@ -353,11 +358,13 @@ acpi_ns_attach_data (
* *
* FUNCTION: Acpi_ns_detach_data * FUNCTION: Acpi_ns_detach_data
* *
* PARAMETERS: * PARAMETERS: Node - Namespace node
* Handler - Handler associated with the data
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Low-level detach data. Delete the data node, but the caller
* is responsible for the actual data.
* *
******************************************************************************/ ******************************************************************************/
...@@ -398,11 +405,14 @@ acpi_ns_detach_data ( ...@@ -398,11 +405,14 @@ acpi_ns_detach_data (
* *
* FUNCTION: Acpi_ns_get_attached_data * FUNCTION: Acpi_ns_get_attached_data
* *
* PARAMETERS: * PARAMETERS: Node - Namespace node
* Handler - Handler associated with the data
* Data - Where the data is returned
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Low level interface to obtain data previously associated with
* a namespace node.
* *
******************************************************************************/ ******************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* Module Name: nsxfeval - Public interfaces to the ACPI subsystem * Module Name: nsxfeval - Public interfaces to the ACPI subsystem
* ACPI Object evaluation interfaces * ACPI Object evaluation interfaces
* $Revision: 3 $ * $Revision: 4 $
* *
******************************************************************************/ ******************************************************************************/
...@@ -570,11 +570,13 @@ acpi_get_devices ( ...@@ -570,11 +570,13 @@ acpi_get_devices (
* *
* FUNCTION: Acpi_attach_data * FUNCTION: Acpi_attach_data
* *
* PARAMETERS: * PARAMETERS: Obj_handle - Namespace node
* Handler - Handler for this attachment
* Data - Pointer to data to be attached
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Attach arbitrary data and handler to a namespace node.
* *
******************************************************************************/ ******************************************************************************/
...@@ -621,11 +623,12 @@ acpi_attach_data ( ...@@ -621,11 +623,12 @@ acpi_attach_data (
* *
* FUNCTION: Acpi_detach_data * FUNCTION: Acpi_detach_data
* *
* PARAMETERS: * PARAMETERS: Obj_handle - Namespace node handle
* Handler - Handler used in call to Acpi_attach_data
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Remove data that was previously attached to a node.
* *
******************************************************************************/ ******************************************************************************/
...@@ -670,11 +673,13 @@ acpi_detach_data ( ...@@ -670,11 +673,13 @@ acpi_detach_data (
* *
* FUNCTION: Acpi_get_data * FUNCTION: Acpi_get_data
* *
* PARAMETERS: * PARAMETERS: Obj_handle - Namespace node
* Handler - Handler used in call to Attach_data
* Data - Where the data is returned
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Retrieve data that was previously attached to a namespace node.
* *
******************************************************************************/ ******************************************************************************/
......
...@@ -702,7 +702,7 @@ acpi_status ...@@ -702,7 +702,7 @@ acpi_status
acpi_os_wait_semaphore( acpi_os_wait_semaphore(
acpi_handle handle, acpi_handle handle,
u32 units, u32 units,
u32 timeout) u16 timeout)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct semaphore *sem = (struct semaphore*)handle; struct semaphore *sem = (struct semaphore*)handle;
...@@ -739,7 +739,7 @@ acpi_os_wait_semaphore( ...@@ -739,7 +739,7 @@ acpi_os_wait_semaphore(
* Wait Indefinitely: * Wait Indefinitely:
* ------------------ * ------------------
*/ */
case WAIT_FOREVER: case ACPI_WAIT_FOREVER:
ret = down_interruptible(sem); ret = down_interruptible(sem);
if (ret < 0) if (ret < 0)
status = AE_ERROR; status = AE_ERROR;
......
...@@ -258,6 +258,8 @@ acpi_bus_driver_init ( ...@@ -258,6 +258,8 @@ acpi_bus_driver_init (
return_VALUE(result); return_VALUE(result);
} }
device->driver = driver;
/* /*
* TBD - Configuration Management: Assign resources to device based * TBD - Configuration Management: Assign resources to device based
* upon possible configuration and currently allocated resources. * upon possible configuration and currently allocated resources.
......
/****************************************************************************** /******************************************************************************
* *
* Module Name: tbconvrt - ACPI Table conversion utilities * Module Name: tbconvrt - ACPI Table conversion utilities
* $Revision: 44 $ * $Revision: 45 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
* *
* FUNCTION: Acpi_tb_get_table_count * FUNCTION: Acpi_tb_get_table_count
* *
* PARAMETERS: * PARAMETERS: RSDP - Pointer to the RSDP
* RSDT - Pointer to the RSDT/XSDT
* *
* RETURN: * RETURN: The number of tables pointed to by the RSDT or XSDT.
* *
* DESCRIPTION: Calculate the number of tables * DESCRIPTION: Calculate the number of tables. Automatically handles either
* an RSDT or XSDT.
* *
******************************************************************************/ ******************************************************************************/
...@@ -80,9 +82,9 @@ acpi_tb_get_table_count ( ...@@ -80,9 +82,9 @@ acpi_tb_get_table_count (
* *
* FUNCTION: Acpi_tb_convert_to_xsdt * FUNCTION: Acpi_tb_convert_to_xsdt
* *
* PARAMETERS: * PARAMETERS: Table_info - Info about the RSDT
* *
* RETURN: * RETURN: Status
* *
* DESCRIPTION: Convert an RSDT to an XSDT (internal common format) * DESCRIPTION: Convert an RSDT to an XSDT (internal common format)
* *
...@@ -311,13 +313,11 @@ acpi_tb_convert_fadt2 ( ...@@ -311,13 +313,11 @@ acpi_tb_convert_fadt2 (
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: * DESCRIPTION: Converts a BIOS supplied ACPI 1.0 FADT to a local
* Converts a BIOS supplied ACPI 1.0 FADT to an intermediate * ACPI 2.0 FADT. If the BIOS supplied a 2.0 FADT then it is simply
* ACPI 2.0 FADT. If the BIOS supplied a 2.0 FADT then it is simply * copied to the local FADT. The ACPI CA software uses this
* copied to the intermediate FADT. The ACPI CA software uses this * local FADT. Thus a significant amount of special #ifdef
* intermediate FADT. Thus a significant amount of special #ifdef * type codeing is saved.
* type codeing is saved. This intermediate FADT will need to be
* freed at some point.
* *
******************************************************************************/ ******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
* *
* Module Name: utmisc - common utility procedures * Module Name: utmisc - common utility procedures
* $Revision: 85 $ * $Revision: 86 $
* *
******************************************************************************/ ******************************************************************************/
...@@ -685,7 +685,7 @@ acpi_ut_acquire_mutex ( ...@@ -685,7 +685,7 @@ acpi_ut_acquire_mutex (
this_thread_id, acpi_ut_get_mutex_name (mutex_id))); this_thread_id, acpi_ut_get_mutex_name (mutex_id)));
status = acpi_os_wait_semaphore (acpi_gbl_acpi_mutex_info[mutex_id].mutex, status = acpi_os_wait_semaphore (acpi_gbl_acpi_mutex_info[mutex_id].mutex,
1, WAIT_FOREVER); 1, ACPI_WAIT_FOREVER);
if (ACPI_SUCCESS (status)) { if (ACPI_SUCCESS (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Thread %X acquired Mutex [%s]\n", ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Thread %X acquired Mutex [%s]\n",
this_thread_id, acpi_ut_get_mutex_name (mutex_id))); this_thread_id, acpi_ut_get_mutex_name (mutex_id)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment