Commit 8313524a authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPI: ACPICA 20060310

Tagged all external interfaces to the subsystem with the
new ACPI_EXPORT_SYMBOL macro. This macro can be defined
as necessary to assist kernel integration. For Linux,
the macro resolves to the EXPORT_SYMBOL macro. The default
definition is NULL.

Added the ACPI_THREAD_ID type for the return value from
acpi_os_get_thread_id(). This allows the host to define this
as necessary to simplify kernel integration. The default
definition is ACPI_NATIVE_UINT.

Valery Podrezov fixed two interpreter problems related
to error processing, the deletion of objects, and placing
invalid pointers onto the internal operator result stack.
http://bugzilla.kernel.org/show_bug.cgi?id=6028
http://bugzilla.kernel.org/show_bug.cgi?id=6151

Increased the reference count threshold where a warning is
emitted for large reference counts in order to eliminate
unnecessary warnings on systems with large namespaces
(especially 64-bit.) Increased the value from 0x400
to 0x800.

Due to universal disagreement as to the meaning of the
'c' in the calloc() function, the ACPI_MEM_CALLOCATE
macro has been renamed to ACPI_ALLOCATE_ZEROED so that the
purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and
ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE.
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent ea936b78
...@@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode, ...@@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode,
* special data types. * special data types.
* *
* NOTES: walk_state fields are initialized to zero by the * NOTES: walk_state fields are initialized to zero by the
* ACPI_MEM_CALLOCATE(). * ACPI_ALLOCATE_ZEROED().
* *
* A pseudo-Namespace Node is assigned to each argument and local * A pseudo-Namespace Node is assigned to each argument and local
* so that ref_of() can return a pointer to the Node. * so that ref_of() can return a pointer to the Node.
......
...@@ -245,7 +245,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, ...@@ -245,7 +245,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
"Buffer defined with zero length in AML, creating\n")); "Buffer defined with zero length in AML, creating\n"));
} else { } else {
obj_desc->buffer.pointer = obj_desc->buffer.pointer =
ACPI_MEM_CALLOCATE(obj_desc->buffer.length); ACPI_ALLOCATE_ZEROED(obj_desc->buffer.length);
if (!obj_desc->buffer.pointer) { if (!obj_desc->buffer.pointer) {
acpi_ut_delete_object_desc(obj_desc); acpi_ut_delete_object_desc(obj_desc);
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
...@@ -341,9 +341,10 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, ...@@ -341,9 +341,10 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
* individual objects). Add an extra pointer slot so * individual objects). Add an extra pointer slot so
* that the list is always null terminated. * that the list is always null terminated.
*/ */
obj_desc->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) obj_desc-> obj_desc->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size)
package.count + obj_desc->package.
1) * sizeof(void *)); count +
1) * sizeof(void *));
if (!obj_desc->package.elements) { if (!obj_desc->package.elements) {
acpi_ut_delete_object_desc(obj_desc); acpi_ut_delete_object_desc(obj_desc);
......
...@@ -577,7 +577,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, ...@@ -577,7 +577,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
/* Free the namestring created above */ /* Free the namestring created above */
ACPI_MEM_FREE(name_string); ACPI_FREE(name_string);
/* Check status from the lookup */ /* Check status from the lookup */
......
...@@ -1113,7 +1113,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) ...@@ -1113,7 +1113,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
ACPI_NS_DONT_OPEN_SCOPE, walk_state, ACPI_NS_DONT_OPEN_SCOPE, walk_state,
&(new_node)); &(new_node));
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
/* /*
* Make sure that what we found is indeed a method * Make sure that what we found is indeed a method
* We didn't search for a method on purpose, to see if the name * We didn't search for a method on purpose, to see if the name
......
...@@ -66,7 +66,6 @@ void *acpi_ds_obj_stack_get_value(u32 index, ...@@ -66,7 +66,6 @@ void *acpi_ds_obj_stack_get_value(u32 index,
#endif #endif
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_ds_result_remove * FUNCTION: acpi_ds_result_remove
...@@ -128,7 +127,6 @@ acpi_ds_result_remove(union acpi_operand_object **object, ...@@ -128,7 +127,6 @@ acpi_ds_result_remove(union acpi_operand_object **object,
return (AE_OK); return (AE_OK);
} }
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -645,7 +643,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, ...@@ -645,7 +643,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
ACPI_FUNCTION_TRACE("ds_create_walk_state"); ACPI_FUNCTION_TRACE("ds_create_walk_state");
walk_state = ACPI_MEM_CALLOCATE(sizeof(struct acpi_walk_state)); walk_state = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_walk_state));
if (!walk_state) { if (!walk_state) {
return_PTR(NULL); return_PTR(NULL);
} }
...@@ -668,7 +666,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, ...@@ -668,7 +666,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
status = acpi_ds_result_stack_push(walk_state); status = acpi_ds_result_stack_push(walk_state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(walk_state); ACPI_FREE(walk_state);
return_PTR(NULL); return_PTR(NULL);
} }
...@@ -859,7 +857,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) ...@@ -859,7 +857,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
acpi_ut_delete_generic_state(state); acpi_ut_delete_generic_state(state);
} }
ACPI_MEM_FREE(walk_state); ACPI_FREE(walk_state);
return_VOID; return_VOID;
} }
......
...@@ -207,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, ...@@ -207,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_HANDLER) { ACPI_GPE_DISPATCH_HANDLER) {
ACPI_MEM_FREE(gpe_event_info->dispatch.handler); ACPI_FREE(gpe_event_info->dispatch.handler);
gpe_event_info->dispatch.handler = NULL; gpe_event_info->dispatch.handler = NULL;
gpe_event_info->flags &= gpe_event_info->flags &=
~ACPI_GPE_DISPATCH_MASK; ~ACPI_GPE_DISPATCH_MASK;
...@@ -504,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 ...@@ -504,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
/* Not found, must allocate a new xrupt descriptor */ /* Not found, must allocate a new xrupt descriptor */
gpe_xrupt = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_xrupt_info)); gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info));
if (!gpe_xrupt) { if (!gpe_xrupt) {
return_PTR(NULL); return_PTR(NULL);
} }
...@@ -595,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) ...@@ -595,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
/* Free the block */ /* Free the block */
ACPI_MEM_FREE(gpe_xrupt); ACPI_FREE(gpe_xrupt);
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
...@@ -712,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) ...@@ -712,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
/* Free the gpe_block */ /* Free the gpe_block */
ACPI_MEM_FREE(gpe_block->register_info); ACPI_FREE(gpe_block->register_info);
ACPI_MEM_FREE(gpe_block->event_info); ACPI_FREE(gpe_block->event_info);
ACPI_MEM_FREE(gpe_block); ACPI_FREE(gpe_block);
unlock_and_exit: unlock_and_exit:
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
...@@ -748,10 +748,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) ...@@ -748,10 +748,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
/* Allocate the GPE register information block */ /* Allocate the GPE register information block */
gpe_register_info = ACPI_MEM_CALLOCATE((acpi_size) gpe_block-> gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block->
register_count * register_count *
sizeof(struct sizeof(struct
acpi_gpe_register_info)); acpi_gpe_register_info));
if (!gpe_register_info) { if (!gpe_register_info) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Could not allocate the gpe_register_info table")); "Could not allocate the gpe_register_info table"));
...@@ -762,10 +762,11 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) ...@@ -762,10 +762,11 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
* Allocate the GPE event_info block. There are eight distinct GPEs * Allocate the GPE event_info block. There are eight distinct GPEs
* per register. Initialization to zeros is sufficient. * per register. Initialization to zeros is sufficient.
*/ */
gpe_event_info = ACPI_MEM_CALLOCATE(((acpi_size) gpe_block-> gpe_event_info = ACPI_ALLOCATE_ZEROED(((acpi_size) gpe_block->
register_count * register_count *
ACPI_GPE_REGISTER_WIDTH) * ACPI_GPE_REGISTER_WIDTH) *
sizeof(struct acpi_gpe_event_info)); sizeof(struct
acpi_gpe_event_info));
if (!gpe_event_info) { if (!gpe_event_info) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Could not allocate the gpe_event_info table")); "Could not allocate the gpe_event_info table"));
...@@ -848,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) ...@@ -848,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
error_exit: error_exit:
if (gpe_register_info) { if (gpe_register_info) {
ACPI_MEM_FREE(gpe_register_info); ACPI_FREE(gpe_register_info);
} }
if (gpe_event_info) { if (gpe_event_info) {
ACPI_MEM_FREE(gpe_event_info); ACPI_FREE(gpe_event_info);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
...@@ -895,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, ...@@ -895,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
/* Allocate a new GPE block */ /* Allocate a new GPE block */
gpe_block = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_block_info)); gpe_block = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_block_info));
if (!gpe_block) { if (!gpe_block) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -915,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, ...@@ -915,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
*/ */
status = acpi_ev_create_gpe_info_blocks(gpe_block); status = acpi_ev_create_gpe_info_blocks(gpe_block);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(gpe_block); ACPI_FREE(gpe_block);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -923,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, ...@@ -923,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); status = acpi_ev_install_gpe_block(gpe_block, interrupt_number);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(gpe_block); ACPI_FREE(gpe_block);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
......
...@@ -366,7 +366,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, ...@@ -366,7 +366,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
/* The handler for this region was already installed */ /* The handler for this region was already installed */
ACPI_MEM_FREE(region_context); ACPI_FREE(region_context);
} else { } else {
/* /*
* Save the returned context for use in all accesses to * Save the returned context for use in all accesses to
......
...@@ -75,7 +75,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, ...@@ -75,7 +75,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
if (function == ACPI_REGION_DEACTIVATE) { if (function == ACPI_REGION_DEACTIVATE) {
if (*region_context) { if (*region_context) {
ACPI_MEM_FREE(*region_context); ACPI_FREE(*region_context);
*region_context = NULL; *region_context = NULL;
} }
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
...@@ -84,7 +84,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, ...@@ -84,7 +84,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
/* Create a new context */ /* Create a new context */
local_region_context = local_region_context =
ACPI_MEM_CALLOCATE(sizeof(struct acpi_mem_space_context)); ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context));
if (!(local_region_context)) { if (!(local_region_context)) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -178,7 +178,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, ...@@ -178,7 +178,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
*region_context = NULL; *region_context = NULL;
if (function == ACPI_REGION_DEACTIVATE) { if (function == ACPI_REGION_DEACTIVATE) {
if (pci_id) { if (pci_id) {
ACPI_MEM_FREE(pci_id); ACPI_FREE(pci_id);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -264,7 +264,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, ...@@ -264,7 +264,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
/* Region is still not initialized. Create a new context */ /* Region is still not initialized. Create a new context */
pci_id = ACPI_MEM_CALLOCATE(sizeof(struct acpi_pci_id)); pci_id = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pci_id));
if (!pci_id) { if (!pci_id) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
#include <acpi/acevents.h> #include <acpi/acevents.h>
...@@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) ...@@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_install_exception_handler)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -107,7 +107,6 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) ...@@ -107,7 +107,6 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
* event. * event.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_install_fixed_event_handler(u32 event, acpi_install_fixed_event_handler(u32 event,
acpi_event_handler handler, void *context) acpi_event_handler handler, void *context)
...@@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event, ...@@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_install_fixed_event_handler); ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -175,7 +174,6 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler); ...@@ -175,7 +174,6 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler);
* DESCRIPTION: Disables the event and unregisters the event handler. * DESCRIPTION: Disables the event and unregisters the event handler.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
{ {
...@@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) ...@@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_remove_fixed_event_handler); ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler); ...@@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
* DESCRIPTION: Install a handler for notifies on an ACPI device * DESCRIPTION: Install a handler for notifies on an ACPI device
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_install_notify_handler(acpi_handle device, acpi_install_notify_handler(acpi_handle device,
u32 handler_type, u32 handler_type,
...@@ -384,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device, ...@@ -384,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_install_notify_handler); ACPI_EXPORT_SYMBOL(acpi_install_notify_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -402,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler); ...@@ -402,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler);
* DESCRIPTION: Remove a handler for notifies on an ACPI device * DESCRIPTION: Remove a handler for notifies on an ACPI device
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_remove_notify_handler(acpi_handle device, acpi_remove_notify_handler(acpi_handle device,
u32 handler_type, acpi_notify_handler handler) u32 handler_type, acpi_notify_handler handler)
...@@ -538,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device, ...@@ -538,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_remove_notify_handler); ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -557,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler); ...@@ -557,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler);
* DESCRIPTION: Install a handler for a General Purpose Event. * DESCRIPTION: Install a handler for a General Purpose Event.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_install_gpe_handler(acpi_handle gpe_device, acpi_install_gpe_handler(acpi_handle gpe_device,
u32 gpe_number, u32 gpe_number,
...@@ -599,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, ...@@ -599,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
/* Allocate and init handler object */ /* Allocate and init handler object */
handler = ACPI_MEM_CALLOCATE(sizeof(struct acpi_handler_info)); handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info));
if (!handler) { if (!handler) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto unlock_and_exit; goto unlock_and_exit;
...@@ -633,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, ...@@ -633,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_install_gpe_handler); ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -649,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler); ...@@ -649,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler);
* DESCRIPTION: Remove a handler for a General Purpose acpi_event. * DESCRIPTION: Remove a handler for a General Purpose acpi_event.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_remove_gpe_handler(acpi_handle gpe_device, acpi_remove_gpe_handler(acpi_handle gpe_device,
u32 gpe_number, acpi_event_handler address) u32 gpe_number, acpi_event_handler address)
...@@ -727,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, ...@@ -727,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
/* Now we can free the handler object */ /* Now we can free the handler object */
ACPI_MEM_FREE(handler); ACPI_FREE(handler);
unlock_and_exit: unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_remove_gpe_handler); ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -749,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler); ...@@ -749,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler);
* DESCRIPTION: Acquire the ACPI Global Lock * DESCRIPTION: Acquire the ACPI Global Lock
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle)
{ {
acpi_status status; acpi_status status;
...@@ -774,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) ...@@ -774,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle)
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_acquire_global_lock); ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock)
/******************************************************************************* /*******************************************************************************
* *
...@@ -787,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock); ...@@ -787,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock);
* DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_release_global_lock(u32 handle) acpi_status acpi_release_global_lock(u32 handle)
{ {
acpi_status status; acpi_status status;
...@@ -800,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle) ...@@ -800,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle)
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_release_global_lock); ACPI_EXPORT_SYMBOL(acpi_release_global_lock)
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acevents.h> #include <acpi/acevents.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
...@@ -94,6 +92,8 @@ acpi_status acpi_enable(void) ...@@ -94,6 +92,8 @@ acpi_status acpi_enable(void)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_enable)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_disable * FUNCTION: acpi_disable
...@@ -105,7 +105,6 @@ acpi_status acpi_enable(void) ...@@ -105,7 +105,6 @@ acpi_status acpi_enable(void)
* DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode. * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_disable(void) acpi_status acpi_disable(void)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -137,6 +136,8 @@ acpi_status acpi_disable(void) ...@@ -137,6 +136,8 @@ acpi_status acpi_disable(void)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_disable)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_enable_event * FUNCTION: acpi_enable_event
...@@ -149,7 +150,6 @@ acpi_status acpi_disable(void) ...@@ -149,7 +150,6 @@ acpi_status acpi_disable(void)
* DESCRIPTION: Enable an ACPI event (fixed) * DESCRIPTION: Enable an ACPI event (fixed)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_enable_event(u32 event, u32 flags) acpi_status acpi_enable_event(u32 event, u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) ...@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_enable_event); ACPI_EXPORT_SYMBOL(acpi_enable_event)
/******************************************************************************* /*******************************************************************************
* *
...@@ -208,7 +208,6 @@ EXPORT_SYMBOL(acpi_enable_event); ...@@ -208,7 +208,6 @@ EXPORT_SYMBOL(acpi_enable_event);
* DESCRIPTION: Set the type of an individual GPE * DESCRIPTION: Set the type of an individual GPE
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) ...@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_set_gpe_type); ACPI_EXPORT_SYMBOL(acpi_set_gpe_type)
/******************************************************************************* /*******************************************************************************
* *
...@@ -252,7 +251,6 @@ EXPORT_SYMBOL(acpi_set_gpe_type); ...@@ -252,7 +251,6 @@ EXPORT_SYMBOL(acpi_set_gpe_type);
* DESCRIPTION: Enable an ACPI event (general purpose) * DESCRIPTION: Enable an ACPI event (general purpose)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) ...@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_enable_gpe); ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
/******************************************************************************* /*******************************************************************************
* *
...@@ -304,7 +302,6 @@ EXPORT_SYMBOL(acpi_enable_gpe); ...@@ -304,7 +302,6 @@ EXPORT_SYMBOL(acpi_enable_gpe);
* DESCRIPTION: Disable an ACPI event (general purpose) * DESCRIPTION: Disable an ACPI event (general purpose)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) ...@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_disable_gpe)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_disable_event * FUNCTION: acpi_disable_event
...@@ -350,7 +349,6 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) ...@@ -350,7 +349,6 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
* DESCRIPTION: Disable an ACPI event (fixed) * DESCRIPTION: Disable an ACPI event (fixed)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_disable_event(u32 event, u32 flags) acpi_status acpi_disable_event(u32 event, u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags) ...@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_disable_event); ACPI_EXPORT_SYMBOL(acpi_disable_event)
/******************************************************************************* /*******************************************************************************
* *
...@@ -405,7 +403,6 @@ EXPORT_SYMBOL(acpi_disable_event); ...@@ -405,7 +403,6 @@ EXPORT_SYMBOL(acpi_disable_event);
* DESCRIPTION: Clear an ACPI event (fixed) * DESCRIPTION: Clear an ACPI event (fixed)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_clear_event(u32 event) acpi_status acpi_clear_event(u32 event)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event) ...@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_clear_event); ACPI_EXPORT_SYMBOL(acpi_clear_event)
/******************************************************************************* /*******************************************************************************
* *
...@@ -444,7 +441,6 @@ EXPORT_SYMBOL(acpi_clear_event); ...@@ -444,7 +441,6 @@ EXPORT_SYMBOL(acpi_clear_event);
* DESCRIPTION: Clear an ACPI event (general purpose) * DESCRIPTION: Clear an ACPI event (general purpose)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) ...@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_clear_gpe)
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
...@@ -492,7 +490,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) ...@@ -492,7 +490,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
* DESCRIPTION: Obtains and returns the current status of the event * DESCRIPTION: Obtains and returns the current status of the event
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) ...@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_event_status)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_gpe_status * FUNCTION: acpi_get_gpe_status
...@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) ...@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
* DESCRIPTION: Get status of an event (general purpose) * DESCRIPTION: Get status of an event (general purpose)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_gpe_status(acpi_handle gpe_device, acpi_get_gpe_status(acpi_handle gpe_device,
u32 gpe_number, u32 flags, acpi_event_status * event_status) u32 gpe_number, u32 flags, acpi_event_status * event_status)
...@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device, ...@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device,
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device, ...@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device,
* DESCRIPTION: Create and Install a block of GPE registers * DESCRIPTION: Create and Install a block of GPE registers
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_install_gpe_block(acpi_handle gpe_device, acpi_install_gpe_block(acpi_handle gpe_device,
struct acpi_generic_address *gpe_block_address, struct acpi_generic_address *gpe_block_address,
...@@ -666,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, ...@@ -666,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_install_gpe_block); ACPI_EXPORT_SYMBOL(acpi_install_gpe_block)
/******************************************************************************* /*******************************************************************************
* *
...@@ -679,7 +678,6 @@ EXPORT_SYMBOL(acpi_install_gpe_block); ...@@ -679,7 +678,6 @@ EXPORT_SYMBOL(acpi_install_gpe_block);
* DESCRIPTION: Remove a previously installed block of GPE registers * DESCRIPTION: Remove a previously installed block of GPE registers
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
{ {
union acpi_operand_object *obj_desc; union acpi_operand_object *obj_desc;
...@@ -722,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) ...@@ -722,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_remove_gpe_block); ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
#include <acpi/acevents.h> #include <acpi/acevents.h>
...@@ -114,7 +112,7 @@ acpi_install_address_space_handler(acpi_handle device, ...@@ -114,7 +112,7 @@ acpi_install_address_space_handler(acpi_handle device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_install_address_space_handler); ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler)
/******************************************************************************* /*******************************************************************************
* *
...@@ -129,7 +127,6 @@ EXPORT_SYMBOL(acpi_install_address_space_handler); ...@@ -129,7 +127,6 @@ EXPORT_SYMBOL(acpi_install_address_space_handler);
* DESCRIPTION: Remove a previously installed handler. * DESCRIPTION: Remove a previously installed handler.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_remove_address_space_handler(acpi_handle device, acpi_remove_address_space_handler(acpi_handle device,
acpi_adr_space_type space_id, acpi_adr_space_type space_id,
...@@ -242,4 +239,4 @@ acpi_remove_address_space_handler(acpi_handle device, ...@@ -242,4 +239,4 @@ acpi_remove_address_space_handler(acpi_handle device,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_remove_address_space_handler); ACPI_EXPORT_SYMBOL(acpi_remove_address_space_handler)
...@@ -349,7 +349,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, ...@@ -349,7 +349,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
/* Allocate a buffer for the entire table */ /* Allocate a buffer for the entire table */
table_ptr = ACPI_MEM_ALLOCATE(table_header.length); table_ptr = ACPI_ALLOCATE(table_header.length);
if (!table_ptr) { if (!table_ptr) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -447,7 +447,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, ...@@ -447,7 +447,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
cleanup: cleanup:
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(table_ptr); ACPI_FREE(table_ptr);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
......
...@@ -903,7 +903,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) ...@@ -903,7 +903,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc)
acpi_os_printf("Could not convert name to pathname\n"); acpi_os_printf("Could not convert name to pathname\n");
} else { } else {
acpi_os_printf("%s\n", (char *)ret_buf.pointer); acpi_os_printf("%s\n", (char *)ret_buf.pointer);
ACPI_MEM_FREE(ret_buf.pointer); ACPI_FREE(ret_buf.pointer);
} }
} else if (obj_desc->reference.object) { } else if (obj_desc->reference.object) {
acpi_os_printf("\nReferenced Object: %p\n", acpi_os_printf("\nReferenced Object: %p\n",
......
...@@ -333,7 +333,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, ...@@ -333,7 +333,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
/* We need to create a new buffer */ /* We need to create a new buffer */
new_buffer = ACPI_MEM_CALLOCATE(required_length); new_buffer = ACPI_ALLOCATE_ZEROED(required_length);
if (!new_buffer) { if (!new_buffer) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -377,7 +377,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, ...@@ -377,7 +377,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
/* Free temporary buffer if we used one */ /* Free temporary buffer if we used one */
if (new_buffer) { if (new_buffer) {
ACPI_MEM_FREE(new_buffer); ACPI_FREE(new_buffer);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
......
...@@ -98,7 +98,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) ...@@ -98,7 +98,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
* Allocate a buffer for the name. * Allocate a buffer for the name.
* This buffer must be deleted by the caller! * This buffer must be deleted by the caller!
*/ */
name_string = ACPI_MEM_ALLOCATE(size_needed); name_string = ACPI_ALLOCATE(size_needed);
if (!name_string) { if (!name_string) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Could not allocate size %d", size_needed)); "Could not allocate size %d", size_needed));
...@@ -424,7 +424,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, ...@@ -424,7 +424,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
if (name_string) { if (name_string) {
ACPI_MEM_FREE(name_string); ACPI_FREE(name_string);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
......
...@@ -554,16 +554,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) ...@@ -554,16 +554,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
cleanup: cleanup:
if (!walk_state->result_obj) {
walk_state->result_obj = return_desc;
}
/* Delete return object on error */ /* Delete return object on error */
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference(return_desc); acpi_ut_remove_reference(return_desc);
} }
/* Save return object on success */
else if (!walk_state->result_obj) {
walk_state->result_obj = return_desc;
}
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -1028,6 +1030,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) ...@@ -1028,6 +1030,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
acpi_ut_remove_reference(return_desc); acpi_ut_remove_reference(return_desc);
} }
walk_state->result_obj = return_desc; /* Save return object on success */
else {
walk_state->result_obj = return_desc;
}
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -391,7 +391,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) ...@@ -391,7 +391,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
index = operand[1]->integer.value; index = operand[1]->integer.value;
return_desc->reference.offset = (u32) index; return_desc->reference.offset = (u32) index;
return_desc->reference.opcode = AML_INDEX_OP; return_desc->reference.opcode = AML_INDEX_OP;
return_desc->reference.object = operand[0];
/* /*
* At this point, the Source operand is a String, Buffer, or Package. * At this point, the Source operand is a String, Buffer, or Package.
...@@ -445,9 +444,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) ...@@ -445,9 +444,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
} }
/* /*
* Add a reference to the target package/buffer/string for the life * Save the target object and add a reference to it for the life
* of the index * of the index
*/ */
return_desc->reference.object = operand[0];
acpi_ut_add_reference(operand[0]); acpi_ut_add_reference(operand[0]);
/* Store the reference to the Target */ /* Store the reference to the Target */
......
...@@ -100,8 +100,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) ...@@ -100,8 +100,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
(u32) operand[1]->integer.value, (u32) operand[1]->integer.value,
(u32) operand[2]->integer.value)); (u32) operand[2]->integer.value));
fatal = fatal = ACPI_ALLOCATE(sizeof(struct acpi_signal_fatal_info));
ACPI_MEM_ALLOCATE(sizeof(struct acpi_signal_fatal_info));
if (fatal) { if (fatal) {
fatal->type = (u32) operand[0]->integer.value; fatal->type = (u32) operand[0]->integer.value;
fatal->code = (u32) operand[1]->integer.value; fatal->code = (u32) operand[1]->integer.value;
...@@ -114,7 +113,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) ...@@ -114,7 +113,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
/* Might return while OS is shutting down, just continue */ /* Might return while OS is shutting down, just continue */
ACPI_MEM_FREE(fatal); ACPI_FREE(fatal);
break; break;
default: default:
...@@ -196,7 +195,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) ...@@ -196,7 +195,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
/* Always allocate a new buffer for the String */ /* Always allocate a new buffer for the String */
buffer = ACPI_MEM_CALLOCATE((acpi_size) length + 1); buffer = ACPI_ALLOCATE_ZEROED((acpi_size) length + 1);
if (!buffer) { if (!buffer) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto cleanup; goto cleanup;
...@@ -211,7 +210,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) ...@@ -211,7 +210,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
/* Allocate a new buffer for the Buffer */ /* Allocate a new buffer for the Buffer */
buffer = ACPI_MEM_CALLOCATE(length); buffer = ACPI_ALLOCATE_ZEROED(length);
if (!buffer) { if (!buffer) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto cleanup; goto cleanup;
......
...@@ -182,8 +182,8 @@ acpi_ex_system_memory_space_handler(u32 function, ...@@ -182,8 +182,8 @@ acpi_ex_system_memory_space_handler(u32 function,
(acpi_integer) mem_info->mapped_physical_address); (acpi_integer) mem_info->mapped_physical_address);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"system_memory %d (%d width) Address=%8.8X%8.8X\n", "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n",
function, bit_width, ACPI_FORMAT_UINT64(address))); bit_width, function, ACPI_FORMAT_UINT64(address)));
/* /*
* Perform the memory read or write * Perform the memory read or write
...@@ -287,8 +287,8 @@ acpi_ex_system_io_space_handler(u32 function, ...@@ -287,8 +287,8 @@ acpi_ex_system_io_space_handler(u32 function,
ACPI_FUNCTION_TRACE("ex_system_io_space_handler"); ACPI_FUNCTION_TRACE("ex_system_io_space_handler");
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"system_iO %d (%d width) Address=%8.8X%8.8X\n", "System-IO (width %d) R/W %d Address=%8.8X%8.8X\n",
function, bit_width, ACPI_FORMAT_UINT64(address))); bit_width, function, ACPI_FORMAT_UINT64(address)));
/* Decode the function parameter */ /* Decode the function parameter */
...@@ -361,7 +361,7 @@ acpi_ex_pci_config_space_handler(u32 function, ...@@ -361,7 +361,7 @@ acpi_ex_pci_config_space_handler(u32 function,
pci_register = (u16) (u32) address; pci_register = (u16) (u32) address;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"pci_config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n", "Pci-Config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
function, bit_width, pci_id->segment, pci_id->bus, function, bit_width, pci_id->segment, pci_id->bus,
pci_id->device, pci_id->function, pci_register)); pci_id->device, pci_id->function, pci_register));
......
...@@ -80,7 +80,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, ...@@ -80,7 +80,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
*/ */
if ((target_desc->buffer.length == 0) || if ((target_desc->buffer.length == 0) ||
(target_desc->common.flags & AOPOBJ_STATIC_POINTER)) { (target_desc->common.flags & AOPOBJ_STATIC_POINTER)) {
target_desc->buffer.pointer = ACPI_MEM_ALLOCATE(length); target_desc->buffer.pointer = ACPI_ALLOCATE(length);
if (!target_desc->buffer.pointer) { if (!target_desc->buffer.pointer) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -188,11 +188,11 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, ...@@ -188,11 +188,11 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
/* Only free if not a pointer into the DSDT */ /* Only free if not a pointer into the DSDT */
ACPI_MEM_FREE(target_desc->string.pointer); ACPI_FREE(target_desc->string.pointer);
} }
target_desc->string.pointer = ACPI_MEM_CALLOCATE((acpi_size) target_desc->string.pointer = ACPI_ALLOCATE_ZEROED((acpi_size)
length + 1); length + 1);
if (!target_desc->string.pointer) { if (!target_desc->string.pointer) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
#include <acpi/acevents.h> #include <acpi/acevents.h>
...@@ -220,7 +218,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) ...@@ -220,7 +218,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_sleep_type_data); ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data)
/******************************************************************************* /*******************************************************************************
* *
...@@ -233,7 +231,6 @@ EXPORT_SYMBOL(acpi_get_sleep_type_data); ...@@ -233,7 +231,6 @@ EXPORT_SYMBOL(acpi_get_sleep_type_data);
* DESCRIPTION: Map register_id into a register bitmask. * DESCRIPTION: Map register_id into a register bitmask.
* *
******************************************************************************/ ******************************************************************************/
struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
{ {
ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY();
...@@ -312,7 +309,7 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) ...@@ -312,7 +309,7 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_register); ACPI_EXPORT_SYMBOL(acpi_get_register)
/******************************************************************************* /*******************************************************************************
* *
...@@ -328,7 +325,6 @@ EXPORT_SYMBOL(acpi_get_register); ...@@ -328,7 +325,6 @@ EXPORT_SYMBOL(acpi_get_register);
* DESCRIPTION: ACPI Bit Register write function. * DESCRIPTION: ACPI Bit Register write function.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
{ {
u32 register_value = 0; u32 register_value = 0;
...@@ -475,7 +471,7 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) ...@@ -475,7 +471,7 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_set_register); ACPI_EXPORT_SYMBOL(acpi_set_register)
/****************************************************************************** /******************************************************************************
* *
...@@ -491,7 +487,6 @@ EXPORT_SYMBOL(acpi_set_register); ...@@ -491,7 +487,6 @@ EXPORT_SYMBOL(acpi_set_register);
* given offset. * given offset.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value)
{ {
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#define _COMPONENT ACPI_HARDWARE #define _COMPONENT ACPI_HARDWARE
...@@ -79,6 +78,8 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address) ...@@ -79,6 +78,8 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_firmware_waking_vector * FUNCTION: acpi_get_firmware_waking_vector
...@@ -92,7 +93,6 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address) ...@@ -92,7 +93,6 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
* DESCRIPTION: Access function for the firmware_waking_vector field in FACS * DESCRIPTION: Access function for the firmware_waking_vector field in FACS
* *
******************************************************************************/ ******************************************************************************/
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
acpi_status acpi_status
acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
...@@ -118,6 +118,8 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) ...@@ -118,6 +118,8 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector)
#endif #endif
/******************************************************************************* /*******************************************************************************
...@@ -134,7 +136,6 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) ...@@ -134,7 +136,6 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
* various OS-specific tasks between the two steps. * various OS-specific tasks between the two steps.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
{ {
acpi_status status; acpi_status status;
...@@ -206,6 +207,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) ...@@ -206,6 +207,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_enter_sleep_state * FUNCTION: acpi_enter_sleep_state
...@@ -218,7 +221,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) ...@@ -218,7 +221,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
* *
******************************************************************************/ ******************************************************************************/
acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
{ {
u32 PM1Acontrol; u32 PM1Acontrol;
...@@ -378,7 +380,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) ...@@ -378,7 +380,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
EXPORT_SYMBOL(acpi_enter_sleep_state); ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)
/******************************************************************************* /*******************************************************************************
* *
...@@ -392,7 +394,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state); ...@@ -392,7 +394,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state);
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
* *
******************************************************************************/ ******************************************************************************/
acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
{ {
u32 in_value; u32 in_value;
...@@ -443,7 +444,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) ...@@ -443,7 +444,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
/******************************************************************************* /*******************************************************************************
* *
...@@ -457,7 +458,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); ...@@ -457,7 +458,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);
* Called with interrupts ENABLED. * Called with interrupts ENABLED.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_leave_sleep_state(u8 sleep_state) acpi_status acpi_leave_sleep_state(u8 sleep_state)
{ {
struct acpi_object_list arg_list; struct acpi_object_list arg_list;
...@@ -584,3 +584,5 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) ...@@ -584,3 +584,5 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_leave_sleep_state)
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#define _COMPONENT ACPI_HARDWARE #define _COMPONENT ACPI_HARDWARE
...@@ -76,6 +75,8 @@ acpi_status acpi_get_timer_resolution(u32 * resolution) ...@@ -76,6 +75,8 @@ acpi_status acpi_get_timer_resolution(u32 * resolution)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution)
/****************************************************************************** /******************************************************************************
* *
* FUNCTION: acpi_get_timer * FUNCTION: acpi_get_timer
...@@ -87,7 +88,6 @@ acpi_status acpi_get_timer_resolution(u32 * resolution) ...@@ -87,7 +88,6 @@ acpi_status acpi_get_timer_resolution(u32 * resolution)
* DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks).
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_get_timer(u32 * ticks) acpi_status acpi_get_timer(u32 * ticks)
{ {
acpi_status status; acpi_status status;
...@@ -103,7 +103,7 @@ acpi_status acpi_get_timer(u32 * ticks) ...@@ -103,7 +103,7 @@ acpi_status acpi_get_timer(u32 * ticks)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_timer); ACPI_EXPORT_SYMBOL(acpi_get_timer)
/****************************************************************************** /******************************************************************************
* *
...@@ -133,7 +133,6 @@ EXPORT_SYMBOL(acpi_get_timer); ...@@ -133,7 +133,6 @@ EXPORT_SYMBOL(acpi_get_timer);
* 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
{ {
...@@ -184,4 +183,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) ...@@ -184,4 +183,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_timer_duration); ACPI_EXPORT_SYMBOL(acpi_get_timer_duration)
...@@ -347,14 +347,17 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, ...@@ -347,14 +347,17 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
return_ACPI_STATUS(AE_AML_INTERNAL); return_ACPI_STATUS(AE_AML_INTERNAL);
} }
/* if (!(flags & ACPI_NS_PREFIX_IS_SCOPE)) {
* This node might not be a actual "scope" node (such as a /*
* Device/Method, etc.) It could be a Package or other object node. * This node might not be a actual "scope" node (such as a
* Backup up the tree to find the containing scope node. * Device/Method, etc.) It could be a Package or other object node.
*/ * Backup up the tree to find the containing scope node.
while (!acpi_ns_opens_scope(prefix_node->type) && */
prefix_node->type != ACPI_TYPE_ANY) { while (!acpi_ns_opens_scope(prefix_node->type) &&
prefix_node = acpi_ns_get_parent_node(prefix_node); prefix_node->type != ACPI_TYPE_ANY) {
prefix_node =
acpi_ns_get_parent_node(prefix_node);
}
} }
} }
......
...@@ -68,7 +68,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) ...@@ -68,7 +68,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name)
ACPI_FUNCTION_TRACE("ns_create_node"); ACPI_FUNCTION_TRACE("ns_create_node");
node = ACPI_MEM_CALLOCATE(sizeof(struct acpi_namespace_node)); node = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_namespace_node));
if (!node) { if (!node) {
return_PTR(NULL); return_PTR(NULL);
} }
...@@ -142,7 +142,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) ...@@ -142,7 +142,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node)
* Detach an object if there is one then delete the node * Detach an object if there is one then delete the node
*/ */
acpi_ns_detach_object(node); acpi_ns_detach_object(node);
ACPI_MEM_FREE(node); ACPI_FREE(node);
return_VOID; return_VOID;
} }
...@@ -311,7 +311,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) ...@@ -311,7 +311,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node)
/* Now we can delete the node */ /* Now we can delete the node */
ACPI_MEM_FREE(child_node); ACPI_FREE(child_node);
/* And move on to the next child in the list */ /* And move on to the next child in the list */
......
...@@ -92,7 +92,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, ...@@ -92,7 +92,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
info->hardware_id.value, info->hardware_id.value,
ACPI_FORMAT_UINT64(info->address), ACPI_FORMAT_UINT64(info->address),
info->current_status)); info->current_status));
ACPI_MEM_FREE(info); ACPI_FREE(info);
} }
return (status); return (status);
......
...@@ -151,7 +151,7 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info) ...@@ -151,7 +151,7 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info)
acpi_ut_delete_generic_state(scope_info); acpi_ut_delete_generic_state(scope_info);
cleanup1: cleanup1:
ACPI_MEM_FREE(internal_path); ACPI_FREE(internal_path);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -228,7 +228,7 @@ acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info) ...@@ -228,7 +228,7 @@ acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info)
/* Cleanup */ /* Cleanup */
if (internal_path) { if (internal_path) {
ACPI_MEM_FREE(internal_path); ACPI_FREE(internal_path);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
......
...@@ -424,7 +424,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle, ...@@ -424,7 +424,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
ACPI_WARNING((AE_INFO, "%s._INI failed: %s", ACPI_WARNING((AE_INFO, "%s._INI failed: %s",
scope_name, acpi_format_exception(status))); scope_name, acpi_format_exception(status)));
ACPI_MEM_FREE(scope_name); ACPI_FREE(scope_name);
#endif #endif
} else { } else {
/* Delete any return object (especially if implicit_return is enabled) */ /* Delete any return object (especially if implicit_return is enabled) */
......
...@@ -48,11 +48,6 @@ ...@@ -48,11 +48,6 @@
#define _COMPONENT ACPI_NAMESPACE #define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME("nsnames") ACPI_MODULE_NAME("nsnames")
/* Local prototypes */
static void
acpi_ns_build_external_path(struct acpi_namespace_node *node,
acpi_size size, char *name_buffer);
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_ns_build_external_path * FUNCTION: acpi_ns_build_external_path
...@@ -67,8 +62,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, ...@@ -67,8 +62,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
* DESCRIPTION: Generate a full pathaname * DESCRIPTION: Generate a full pathaname
* *
******************************************************************************/ ******************************************************************************/
void
static void
acpi_ns_build_external_path(struct acpi_namespace_node *node, acpi_ns_build_external_path(struct acpi_namespace_node *node,
acpi_size size, char *name_buffer) acpi_size size, char *name_buffer)
{ {
...@@ -146,7 +140,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) ...@@ -146,7 +140,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
/* Allocate a buffer to be returned to caller */ /* Allocate a buffer to be returned to caller */
name_buffer = ACPI_MEM_CALLOCATE(size); name_buffer = ACPI_ALLOCATE_ZEROED(size);
if (!name_buffer) { if (!name_buffer) {
ACPI_ERROR((AE_INFO, "Allocation failure")); ACPI_ERROR((AE_INFO, "Allocation failure"));
return_PTR(NULL); return_PTR(NULL);
......
...@@ -62,7 +62,7 @@ ACPI_MODULE_NAME("nsparse") ...@@ -62,7 +62,7 @@ ACPI_MODULE_NAME("nsparse")
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc * table_desc) acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc)
{ {
union acpi_parse_object *parse_root; union acpi_parse_object *parse_root;
acpi_status status; acpi_status status;
......
...@@ -103,7 +103,7 @@ acpi_ns_search_node(u32 target_name, ...@@ -103,7 +103,7 @@ acpi_ns_search_node(u32 target_name,
&target_name), &target_name),
acpi_ut_get_type_name(type))); acpi_ut_get_type_name(type)));
ACPI_MEM_FREE(scope_name); ACPI_FREE(scope_name);
} }
} }
#endif #endif
......
...@@ -104,7 +104,7 @@ acpi_ns_report_error(char *module_name, ...@@ -104,7 +104,7 @@ acpi_ns_report_error(char *module_name,
} }
if (name) { if (name) {
ACPI_MEM_FREE(name); ACPI_FREE(name);
} }
} }
...@@ -187,7 +187,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message) ...@@ -187,7 +187,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message)
} }
acpi_os_printf("[%s] (Node %p)", (char *)buffer.pointer, node); acpi_os_printf("[%s] (Node %p)", (char *)buffer.pointer, node);
ACPI_MEM_FREE(buffer.pointer); ACPI_FREE(buffer.pointer);
} }
} }
...@@ -490,7 +490,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) ...@@ -490,7 +490,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name)
/* We need a segment to store the internal name */ /* We need a segment to store the internal name */
internal_name = ACPI_MEM_CALLOCATE(info.length); internal_name = ACPI_ALLOCATE_ZEROED(info.length);
if (!internal_name) { if (!internal_name) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -500,7 +500,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) ...@@ -500,7 +500,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name)
info.internal_name = internal_name; info.internal_name = internal_name;
status = acpi_ns_build_internal_name(&info); status = acpi_ns_build_internal_name(&info);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(internal_name); ACPI_FREE(internal_name);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -632,7 +632,7 @@ acpi_ns_externalize_name(u32 internal_name_length, ...@@ -632,7 +632,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
/* /*
* Build converted_name * Build converted_name
*/ */
*converted_name = ACPI_MEM_CALLOCATE(required_length); *converted_name = ACPI_ALLOCATE_ZEROED(required_length);
if (!(*converted_name)) { if (!(*converted_name)) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -879,7 +879,7 @@ acpi_ns_get_node_by_path(char *pathname, ...@@ -879,7 +879,7 @@ acpi_ns_get_node_by_path(char *pathname,
cleanup: cleanup:
if (internal_path) { if (internal_path) {
ACPI_MEM_FREE(internal_path); ACPI_FREE(internal_path);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
#include <acpi/acinterp.h> #include <acpi/acinterp.h>
...@@ -51,6 +49,7 @@ ...@@ -51,6 +49,7 @@
#define _COMPONENT ACPI_NAMESPACE #define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME("nsxfeval") ACPI_MODULE_NAME("nsxfeval")
#ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_evaluate_object_typed * FUNCTION: acpi_evaluate_object_typed
...@@ -71,12 +70,11 @@ ACPI_MODULE_NAME("nsxfeval") ...@@ -71,12 +70,11 @@ ACPI_MODULE_NAME("nsxfeval")
* be valid (non-null) * be valid (non-null)
* *
******************************************************************************/ ******************************************************************************/
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_status
acpi_evaluate_object_typed(acpi_handle handle, acpi_evaluate_object_typed(acpi_handle handle,
acpi_string pathname, acpi_string pathname,
struct acpi_object_list *external_params, struct acpi_object_list * external_params,
struct acpi_buffer *return_buffer, struct acpi_buffer * return_buffer,
acpi_object_type return_type) acpi_object_type return_type)
{ {
acpi_status status; acpi_status status;
...@@ -142,6 +140,8 @@ acpi_evaluate_object_typed(acpi_handle handle, ...@@ -142,6 +140,8 @@ acpi_evaluate_object_typed(acpi_handle handle,
return_buffer->length = 0; return_buffer->length = 0;
return_ACPI_STATUS(AE_TYPE); return_ACPI_STATUS(AE_TYPE);
} }
ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -163,7 +163,6 @@ acpi_evaluate_object_typed(acpi_handle handle, ...@@ -163,7 +163,6 @@ acpi_evaluate_object_typed(acpi_handle handle,
* be valid (non-null) * be valid (non-null)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_evaluate_object(acpi_handle handle, acpi_evaluate_object(acpi_handle handle,
acpi_string pathname, acpi_string pathname,
...@@ -193,9 +192,9 @@ acpi_evaluate_object(acpi_handle handle, ...@@ -193,9 +192,9 @@ acpi_evaluate_object(acpi_handle handle,
* Allocate a new parameter block for the internal objects * Allocate a new parameter block for the internal objects
* Add 1 to count to allow for null terminated internal list * Add 1 to count to allow for null terminated internal list
*/ */
info.parameters = ACPI_MEM_CALLOCATE(((acpi_size) info.parameters = ACPI_ALLOCATE_ZEROED(((acpi_size)
external_params->count + external_params->count +
1) * sizeof(void *)); 1) * sizeof(void *));
if (!info.parameters) { if (!info.parameters) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -356,7 +355,7 @@ acpi_evaluate_object(acpi_handle handle, ...@@ -356,7 +355,7 @@ acpi_evaluate_object(acpi_handle handle,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_evaluate_object); ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
/******************************************************************************* /*******************************************************************************
* *
...@@ -387,7 +386,6 @@ EXPORT_SYMBOL(acpi_evaluate_object); ...@@ -387,7 +386,6 @@ EXPORT_SYMBOL(acpi_evaluate_object);
* function, etc. * function, etc.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_walk_namespace(acpi_object_type type, acpi_walk_namespace(acpi_object_type type,
acpi_handle start_object, acpi_handle start_object,
...@@ -424,7 +422,7 @@ acpi_walk_namespace(acpi_object_type type, ...@@ -424,7 +422,7 @@ acpi_walk_namespace(acpi_object_type type,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_walk_namespace); ACPI_EXPORT_SYMBOL(acpi_walk_namespace)
/******************************************************************************* /*******************************************************************************
* *
...@@ -439,7 +437,6 @@ EXPORT_SYMBOL(acpi_walk_namespace); ...@@ -439,7 +437,6 @@ EXPORT_SYMBOL(acpi_walk_namespace);
* on that. * on that.
* *
******************************************************************************/ ******************************************************************************/
static acpi_status static acpi_status
acpi_ns_get_device_callback(acpi_handle obj_handle, acpi_ns_get_device_callback(acpi_handle obj_handle,
u32 nesting_level, u32 nesting_level,
...@@ -510,11 +507,11 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, ...@@ -510,11 +507,11 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
sizeof(struct sizeof(struct
acpi_compatible_id)) != acpi_compatible_id)) !=
0) { 0) {
ACPI_MEM_FREE(cid); ACPI_FREE(cid);
return (AE_OK); return (AE_OK);
} }
} }
ACPI_MEM_FREE(cid); ACPI_FREE(cid);
} }
} }
...@@ -592,7 +589,7 @@ acpi_get_devices(char *HID, ...@@ -592,7 +589,7 @@ acpi_get_devices(char *HID,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_devices); ACPI_EXPORT_SYMBOL(acpi_get_devices)
/******************************************************************************* /*******************************************************************************
* *
...@@ -607,7 +604,6 @@ EXPORT_SYMBOL(acpi_get_devices); ...@@ -607,7 +604,6 @@ EXPORT_SYMBOL(acpi_get_devices);
* DESCRIPTION: Attach arbitrary data and handler to a namespace node. * DESCRIPTION: Attach arbitrary data and handler to a namespace node.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_attach_data(acpi_handle obj_handle, acpi_attach_data(acpi_handle obj_handle,
acpi_object_handler handler, void *data) acpi_object_handler handler, void *data)
...@@ -641,6 +637,8 @@ acpi_attach_data(acpi_handle obj_handle, ...@@ -641,6 +637,8 @@ acpi_attach_data(acpi_handle obj_handle,
return (status); return (status);
} }
ACPI_EXPORT_SYMBOL(acpi_attach_data)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_detach_data * FUNCTION: acpi_detach_data
...@@ -653,7 +651,6 @@ acpi_attach_data(acpi_handle obj_handle, ...@@ -653,7 +651,6 @@ acpi_attach_data(acpi_handle obj_handle,
* DESCRIPTION: Remove data that was previously attached to a node. * DESCRIPTION: Remove data that was previously attached to a node.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler)
{ {
...@@ -686,6 +683,8 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) ...@@ -686,6 +683,8 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler)
return (status); return (status);
} }
ACPI_EXPORT_SYMBOL(acpi_detach_data)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_data * FUNCTION: acpi_get_data
...@@ -699,7 +698,6 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) ...@@ -699,7 +698,6 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler)
* DESCRIPTION: Retrieve data that was previously attached to a namespace node. * DESCRIPTION: Retrieve data that was previously attached to a namespace node.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data)
{ {
...@@ -731,3 +729,5 @@ acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) ...@@ -731,3 +729,5 @@ acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data)
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status); return (status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_data)
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
...@@ -126,7 +124,7 @@ acpi_get_handle(acpi_handle parent, ...@@ -126,7 +124,7 @@ acpi_get_handle(acpi_handle parent,
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_handle); ACPI_EXPORT_SYMBOL(acpi_get_handle)
/****************************************************************************** /******************************************************************************
* *
...@@ -143,7 +141,6 @@ EXPORT_SYMBOL(acpi_get_handle); ...@@ -143,7 +141,6 @@ EXPORT_SYMBOL(acpi_get_handle);
* complementary functions. * complementary functions.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
{ {
...@@ -204,7 +201,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) ...@@ -204,7 +201,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_name); ACPI_EXPORT_SYMBOL(acpi_get_name)
/****************************************************************************** /******************************************************************************
* *
...@@ -220,7 +217,6 @@ EXPORT_SYMBOL(acpi_get_name); ...@@ -220,7 +217,6 @@ EXPORT_SYMBOL(acpi_get_name);
* control methods (Such as in the case of a device.) * control methods (Such as in the case of a device.)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
{ {
...@@ -242,7 +238,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) ...@@ -242,7 +238,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
return (status); return (status);
} }
info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_device_info)); info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info));
if (!info) { if (!info) {
return (AE_NO_MEMORY); return (AE_NO_MEMORY);
} }
...@@ -346,11 +342,11 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) ...@@ -346,11 +342,11 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
} }
cleanup: cleanup:
ACPI_MEM_FREE(info); ACPI_FREE(info);
if (cid_list) { if (cid_list) {
ACPI_MEM_FREE(cid_list); ACPI_FREE(cid_list);
} }
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_object_info); ACPI_EXPORT_SYMBOL(acpi_get_object_info)
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
...@@ -101,7 +99,7 @@ acpi_status acpi_get_type(acpi_handle handle, acpi_object_type * ret_type) ...@@ -101,7 +99,7 @@ acpi_status acpi_get_type(acpi_handle handle, acpi_object_type * ret_type)
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_type); ACPI_EXPORT_SYMBOL(acpi_get_type)
/******************************************************************************* /*******************************************************************************
* *
...@@ -116,7 +114,6 @@ EXPORT_SYMBOL(acpi_get_type); ...@@ -116,7 +114,6 @@ EXPORT_SYMBOL(acpi_get_type);
* Handle. * Handle.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle)
{ {
struct acpi_namespace_node *node; struct acpi_namespace_node *node;
...@@ -162,7 +159,7 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) ...@@ -162,7 +159,7 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle)
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_parent); ACPI_EXPORT_SYMBOL(acpi_get_parent)
/******************************************************************************* /*******************************************************************************
* *
...@@ -181,7 +178,6 @@ EXPORT_SYMBOL(acpi_get_parent); ...@@ -181,7 +178,6 @@ EXPORT_SYMBOL(acpi_get_parent);
* Scope is returned. * Scope is returned.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_next_object(acpi_object_type type, acpi_get_next_object(acpi_object_type type,
acpi_handle parent, acpi_handle parent,
...@@ -243,4 +239,4 @@ acpi_get_next_object(acpi_object_type type, ...@@ -243,4 +239,4 @@ acpi_get_next_object(acpi_object_type type,
return (status); return (status);
} }
EXPORT_SYMBOL(acpi_get_next_object); ACPI_EXPORT_SYMBOL(acpi_get_next_object)
...@@ -306,5 +306,4 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op) ...@@ -306,5 +306,4 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op)
return (child); return (child);
} }
#endif #endif
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
...@@ -141,6 +141,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { ...@@ -141,6 +141,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
}; };
#endif #endif
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/* /*
* Base sizes for external AML resource descriptors, indexed by internal type. * Base sizes for external AML resource descriptors, indexed by internal type.
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acresrc.h> #include <acpi/acresrc.h>
...@@ -118,6 +116,8 @@ acpi_get_irq_routing_table(acpi_handle device_handle, ...@@ -118,6 +116,8 @@ acpi_get_irq_routing_table(acpi_handle device_handle,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_irq_routing_table)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_current_resources * FUNCTION: acpi_get_current_resources
...@@ -141,7 +141,6 @@ acpi_get_irq_routing_table(acpi_handle device_handle, ...@@ -141,7 +141,6 @@ acpi_get_irq_routing_table(acpi_handle device_handle,
* the object indicated by the passed device_handle. * the object indicated by the passed device_handle.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_current_resources(acpi_handle device_handle, acpi_get_current_resources(acpi_handle device_handle,
struct acpi_buffer *ret_buffer) struct acpi_buffer *ret_buffer)
...@@ -169,8 +168,9 @@ acpi_get_current_resources(acpi_handle device_handle, ...@@ -169,8 +168,9 @@ acpi_get_current_resources(acpi_handle device_handle,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_current_resources); ACPI_EXPORT_SYMBOL(acpi_get_current_resources)
#ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_possible_resources * FUNCTION: acpi_get_possible_resources
...@@ -191,8 +191,6 @@ EXPORT_SYMBOL(acpi_get_current_resources); ...@@ -191,8 +191,6 @@ EXPORT_SYMBOL(acpi_get_current_resources);
* and the value of ret_buffer is undefined. * and the value of ret_buffer is undefined.
* *
******************************************************************************/ ******************************************************************************/
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_status
acpi_get_possible_resources(acpi_handle device_handle, acpi_get_possible_resources(acpi_handle device_handle,
struct acpi_buffer *ret_buffer) struct acpi_buffer *ret_buffer)
...@@ -220,7 +218,7 @@ acpi_get_possible_resources(acpi_handle device_handle, ...@@ -220,7 +218,7 @@ acpi_get_possible_resources(acpi_handle device_handle,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_possible_resources); ACPI_EXPORT_SYMBOL(acpi_get_possible_resources)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -241,7 +239,6 @@ EXPORT_SYMBOL(acpi_get_possible_resources); ...@@ -241,7 +239,6 @@ EXPORT_SYMBOL(acpi_get_possible_resources);
* each resource in the list. * each resource in the list.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_walk_resources(acpi_handle device_handle, acpi_walk_resources(acpi_handle device_handle,
char *name, char *name,
...@@ -313,11 +310,11 @@ acpi_walk_resources(acpi_handle device_handle, ...@@ -313,11 +310,11 @@ acpi_walk_resources(acpi_handle device_handle,
resource->length); resource->length);
} }
ACPI_MEM_FREE(buffer.pointer); ACPI_FREE(buffer.pointer);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_walk_resources); ACPI_EXPORT_SYMBOL(acpi_walk_resources)
/******************************************************************************* /*******************************************************************************
* *
...@@ -336,7 +333,6 @@ EXPORT_SYMBOL(acpi_walk_resources); ...@@ -336,7 +333,6 @@ EXPORT_SYMBOL(acpi_walk_resources);
* the buffer pointed to by the in_buffer variable. * the buffer pointed to by the in_buffer variable.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_set_current_resources(acpi_handle device_handle, acpi_set_current_resources(acpi_handle device_handle,
struct acpi_buffer *in_buffer) struct acpi_buffer *in_buffer)
...@@ -356,7 +352,7 @@ acpi_set_current_resources(acpi_handle device_handle, ...@@ -356,7 +352,7 @@ acpi_set_current_resources(acpi_handle device_handle,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_set_current_resources); ACPI_EXPORT_SYMBOL(acpi_set_current_resources)
/****************************************************************************** /******************************************************************************
* *
...@@ -375,7 +371,6 @@ EXPORT_SYMBOL(acpi_set_current_resources); ...@@ -375,7 +371,6 @@ EXPORT_SYMBOL(acpi_set_current_resources);
* addresses. * addresses.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_resource_to_address64(struct acpi_resource *resource, acpi_resource_to_address64(struct acpi_resource *resource,
struct acpi_resource_address64 *out) struct acpi_resource_address64 *out)
...@@ -417,7 +412,7 @@ acpi_resource_to_address64(struct acpi_resource *resource, ...@@ -417,7 +412,7 @@ acpi_resource_to_address64(struct acpi_resource *resource,
return (AE_OK); return (AE_OK);
} }
EXPORT_SYMBOL(acpi_resource_to_address64); ACPI_EXPORT_SYMBOL(acpi_resource_to_address64)
/******************************************************************************* /*******************************************************************************
* *
...@@ -437,7 +432,6 @@ EXPORT_SYMBOL(acpi_resource_to_address64); ...@@ -437,7 +432,6 @@ EXPORT_SYMBOL(acpi_resource_to_address64);
* UUID subtype. Returns a struct acpi_resource of type Vendor. * UUID subtype. Returns a struct acpi_resource of type Vendor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_vendor_resource(acpi_handle device_handle, acpi_get_vendor_resource(acpi_handle device_handle,
char *name, char *name,
...@@ -469,6 +463,8 @@ acpi_get_vendor_resource(acpi_handle device_handle, ...@@ -469,6 +463,8 @@ acpi_get_vendor_resource(acpi_handle device_handle,
return (info.status); return (info.status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_vendor_resource)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_match_vendor_resource * FUNCTION: acpi_rs_match_vendor_resource
...@@ -480,7 +476,6 @@ acpi_get_vendor_resource(acpi_handle device_handle, ...@@ -480,7 +476,6 @@ acpi_get_vendor_resource(acpi_handle device_handle,
* DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID * DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID
* *
******************************************************************************/ ******************************************************************************/
static acpi_status static acpi_status
acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
{ {
...@@ -528,3 +523,5 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) ...@@ -528,3 +523,5 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
info->status = AE_OK; info->status = AE_OK;
return (AE_CTRL_TERMINATE); return (AE_CTRL_TERMINATE);
} }
ACPI_EXPORT_SYMBOL(acpi_rs_match_vendor_resource)
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/actables.h> #include <acpi/actables.h>
...@@ -64,7 +62,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, ...@@ -64,7 +62,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt,
struct fadt_descriptor_rev2 *original_fadt); struct fadt_descriptor_rev2 *original_fadt);
u8 acpi_fadt_is_v1; u8 acpi_fadt_is_v1;
EXPORT_SYMBOL(acpi_fadt_is_v1); ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1)
/******************************************************************************* /*******************************************************************************
* *
...@@ -133,7 +131,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) ...@@ -133,7 +131,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info)
/* Allocate an XSDT */ /* Allocate an XSDT */
new_table = ACPI_MEM_CALLOCATE(table_size); new_table = ACPI_ALLOCATE_ZEROED(table_size);
if (!new_table) { if (!new_table) {
return (AE_NO_MEMORY); return (AE_NO_MEMORY);
} }
...@@ -509,7 +507,7 @@ acpi_status acpi_tb_convert_table_fadt(void) ...@@ -509,7 +507,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
/* Allocate buffer for the ACPI 2.0(+) FADT */ /* Allocate buffer for the ACPI 2.0(+) FADT */
local_fadt = ACPI_MEM_CALLOCATE(sizeof(struct fadt_descriptor_rev2)); local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor_rev2));
if (!local_fadt) { if (!local_fadt) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
......
...@@ -330,7 +330,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, ...@@ -330,7 +330,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
/* Pointer matches processor mode, copy the table to a new buffer */ /* Pointer matches processor mode, copy the table to a new buffer */
full_table = ACPI_MEM_ALLOCATE(header->length); full_table = ACPI_ALLOCATE(header->length);
if (!full_table) { if (!full_table) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Could not allocate table memory for [%4.4s] length %X", "Could not allocate table memory for [%4.4s] length %X",
......
...@@ -248,7 +248,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, ...@@ -248,7 +248,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
/* Allocate a descriptor for this table */ /* Allocate a descriptor for this table */
table_desc = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); table_desc = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc));
if (!table_desc) { if (!table_desc) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -275,7 +275,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, ...@@ -275,7 +275,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
* at this location, so return an error. * at this location, so return an error.
*/ */
if (list_head->next) { if (list_head->next) {
ACPI_MEM_FREE(table_desc); ACPI_FREE(table_desc);
return_ACPI_STATUS(AE_ALREADY_EXISTS); return_ACPI_STATUS(AE_ALREADY_EXISTS);
} }
...@@ -472,7 +472,7 @@ void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc) ...@@ -472,7 +472,7 @@ void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc)
case ACPI_MEM_ALLOCATED: case ACPI_MEM_ALLOCATED:
ACPI_MEM_FREE(table_desc->pointer); ACPI_FREE(table_desc->pointer);
break; break;
case ACPI_MEM_MAPPED: case ACPI_MEM_MAPPED:
...@@ -531,7 +531,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc ...@@ -531,7 +531,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc
/* Free the table descriptor */ /* Free the table descriptor */
next_desc = table_desc->next; next_desc = table_desc->next;
ACPI_MEM_FREE(table_desc); ACPI_FREE(table_desc);
/* Return pointer to the next descriptor */ /* Return pointer to the next descriptor */
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
#include <acpi/actables.h> #include <acpi/actables.h>
...@@ -123,6 +121,8 @@ acpi_status acpi_load_tables(void) ...@@ -123,6 +121,8 @@ acpi_status acpi_load_tables(void)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_load_tables)
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
...@@ -139,7 +139,6 @@ acpi_status acpi_load_tables(void) ...@@ -139,7 +139,6 @@ acpi_status acpi_load_tables(void)
* is determined that the table is invalid, the call will fail. * is determined that the table is invalid, the call will fail.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_load_table(struct acpi_table_header *table_ptr) acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
{ {
acpi_status status; acpi_status status;
...@@ -218,6 +217,8 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) ...@@ -218,6 +217,8 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_load_table)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_unload_table * FUNCTION: acpi_unload_table
...@@ -229,7 +230,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) ...@@ -229,7 +230,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
* DESCRIPTION: This routine is used to force the unload of a table * DESCRIPTION: This routine is used to force the unload of a table
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_unload_table(acpi_table_type table_type) acpi_status acpi_unload_table(acpi_table_type table_type)
{ {
struct acpi_table_desc *table_desc; struct acpi_table_desc *table_desc;
...@@ -263,6 +263,8 @@ acpi_status acpi_unload_table(acpi_table_type table_type) ...@@ -263,6 +263,8 @@ acpi_status acpi_unload_table(acpi_table_type table_type)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_unload_table)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_table_header * FUNCTION: acpi_get_table_header
...@@ -283,7 +285,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type) ...@@ -283,7 +285,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type)
* have a standard header and is fixed length. * have a standard header and is fixed length.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_table_header(acpi_table_type table_type, acpi_get_table_header(acpi_table_type table_type,
u32 instance, struct acpi_table_header *out_table_header) u32 instance, struct acpi_table_header *out_table_header)
...@@ -327,6 +328,7 @@ acpi_get_table_header(acpi_table_type table_type, ...@@ -327,6 +328,7 @@ acpi_get_table_header(acpi_table_type table_type,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_get_table_header)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/******************************************************************************* /*******************************************************************************
...@@ -351,7 +353,6 @@ acpi_get_table_header(acpi_table_type table_type, ...@@ -351,7 +353,6 @@ acpi_get_table_header(acpi_table_type table_type,
* a complete table including the header. * a complete table including the header.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
acpi_get_table(acpi_table_type table_type, acpi_get_table(acpi_table_type table_type,
u32 instance, struct acpi_buffer *ret_buffer) u32 instance, struct acpi_buffer *ret_buffer)
...@@ -420,4 +421,4 @@ acpi_get_table(acpi_table_type table_type, ...@@ -420,4 +421,4 @@ acpi_get_table(acpi_table_type table_type,
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
EXPORT_SYMBOL(acpi_get_table); ACPI_EXPORT_SYMBOL(acpi_get_table)
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/actables.h> #include <acpi/actables.h>
...@@ -263,7 +261,7 @@ acpi_get_firmware_table(acpi_string signature, ...@@ -263,7 +261,7 @@ acpi_get_firmware_table(acpi_string signature,
/* Get and validate the RSDT */ /* Get and validate the RSDT */
rsdt_info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); rsdt_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc));
if (!rsdt_info) { if (!rsdt_info) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -280,13 +278,13 @@ acpi_get_firmware_table(acpi_string signature, ...@@ -280,13 +278,13 @@ acpi_get_firmware_table(acpi_string signature,
/* Allocate a scratch table header and table descriptor */ /* Allocate a scratch table header and table descriptor */
header = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_header)); header = ACPI_ALLOCATE(sizeof(struct acpi_table_header));
if (!header) { if (!header) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto cleanup; goto cleanup;
} }
table_info = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_desc)); table_info = ACPI_ALLOCATE(sizeof(struct acpi_table_desc));
if (!table_info) { if (!table_info) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto cleanup; goto cleanup;
...@@ -359,23 +357,21 @@ acpi_get_firmware_table(acpi_string signature, ...@@ -359,23 +357,21 @@ acpi_get_firmware_table(acpi_string signature,
acpi_os_unmap_memory(rsdt_info->pointer, acpi_os_unmap_memory(rsdt_info->pointer,
(acpi_size) rsdt_info->pointer->length); (acpi_size) rsdt_info->pointer->length);
} }
ACPI_MEM_FREE(rsdt_info); ACPI_FREE(rsdt_info);
if (header) { if (header) {
ACPI_MEM_FREE(header); ACPI_FREE(header);
} }
if (table_info) { if (table_info) {
ACPI_MEM_FREE(table_info); ACPI_FREE(table_info);
} }
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
EXPORT_SYMBOL(acpi_get_firmware_table); ACPI_EXPORT_SYMBOL(acpi_get_firmware_table)
/* TBD: Move to a new file */ /* TBD: Move to a new file */
#if ACPI_MACHINE_WIDTH != 16 #if ACPI_MACHINE_WIDTH != 16
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_find_root_pointer * FUNCTION: acpi_find_root_pointer
...@@ -388,7 +384,6 @@ EXPORT_SYMBOL(acpi_get_firmware_table); ...@@ -388,7 +384,6 @@ EXPORT_SYMBOL(acpi_get_firmware_table);
* DESCRIPTION: Find the RSDP * DESCRIPTION: Find the RSDP
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address)
{ {
struct acpi_table_desc table_info; struct acpi_table_desc table_info;
...@@ -411,6 +406,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) ...@@ -411,6 +406,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_find_root_pointer)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_tb_scan_memory_for_rsdp * FUNCTION: acpi_tb_scan_memory_for_rsdp
...@@ -423,7 +420,6 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) ...@@ -423,7 +420,6 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address)
* DESCRIPTION: Search a block of memory for the RSDP signature * DESCRIPTION: Search a block of memory for the RSDP signature
* *
******************************************************************************/ ******************************************************************************/
static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
{ {
acpi_status status; acpi_status status;
......
...@@ -252,7 +252,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, ...@@ -252,7 +252,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
/* Allocate a new buffer with local interface to allow tracking */ /* Allocate a new buffer with local interface to allow tracking */
buffer->pointer = ACPI_MEM_CALLOCATE(required_length); buffer->pointer = ACPI_ALLOCATE_ZEROED(required_length);
if (!buffer->pointer) { if (!buffer->pointer) {
return (AE_NO_MEMORY); return (AE_NO_MEMORY);
} }
......
...@@ -125,7 +125,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache) ...@@ -125,7 +125,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
&(((char *)cache-> &(((char *)cache->
list_head)[cache-> list_head)[cache->
link_offset]))); link_offset])));
ACPI_MEM_FREE(cache->list_head); ACPI_FREE(cache->list_head);
cache->list_head = next; cache->list_head = next;
cache->current_depth--; cache->current_depth--;
...@@ -194,7 +194,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object) ...@@ -194,7 +194,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object)
/* If cache is full, just free this object */ /* If cache is full, just free this object */
if (cache->current_depth >= cache->max_depth) { if (cache->current_depth >= cache->max_depth) {
ACPI_MEM_FREE(object); ACPI_FREE(object);
ACPI_MEM_TRACKING(cache->total_freed++); ACPI_MEM_TRACKING(cache->total_freed++);
} }
...@@ -289,14 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) ...@@ -289,14 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
ACPI_MEM_TRACKING(cache->total_allocated++); ACPI_MEM_TRACKING(cache->total_allocated++);
/* Avoid deadlock with ACPI_MEM_CALLOCATE */ /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */
status = acpi_ut_release_mutex(ACPI_MTX_CACHES); status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return (NULL); return (NULL);
} }
object = ACPI_MEM_CALLOCATE(cache->object_size); object = ACPI_ALLOCATE_ZEROED(cache->object_size);
if (!object) { if (!object) {
return (NULL); return (NULL);
} }
......
...@@ -472,8 +472,8 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, ...@@ -472,8 +472,8 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
case ACPI_TYPE_STRING: case ACPI_TYPE_STRING:
internal_object->string.pointer = internal_object->string.pointer =
ACPI_MEM_CALLOCATE((acpi_size) external_object->string. ACPI_ALLOCATE_ZEROED((acpi_size) external_object->string.
length + 1); length + 1);
if (!internal_object->string.pointer) { if (!internal_object->string.pointer) {
goto error_exit; goto error_exit;
} }
...@@ -488,7 +488,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, ...@@ -488,7 +488,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
case ACPI_TYPE_BUFFER: case ACPI_TYPE_BUFFER:
internal_object->buffer.pointer = internal_object->buffer.pointer =
ACPI_MEM_CALLOCATE(external_object->buffer.length); ACPI_ALLOCATE_ZEROED(external_object->buffer.length);
if (!internal_object->buffer.pointer) { if (!internal_object->buffer.pointer) {
goto error_exit; goto error_exit;
} }
...@@ -676,7 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, ...@@ -676,7 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
if ((source_desc->buffer.pointer) && if ((source_desc->buffer.pointer) &&
(source_desc->buffer.length)) { (source_desc->buffer.length)) {
dest_desc->buffer.pointer = dest_desc->buffer.pointer =
ACPI_MEM_ALLOCATE(source_desc->buffer.length); ACPI_ALLOCATE(source_desc->buffer.length);
if (!dest_desc->buffer.pointer) { if (!dest_desc->buffer.pointer) {
return (AE_NO_MEMORY); return (AE_NO_MEMORY);
} }
...@@ -697,8 +697,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, ...@@ -697,8 +697,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
*/ */
if (source_desc->string.pointer) { if (source_desc->string.pointer) {
dest_desc->string.pointer = dest_desc->string.pointer =
ACPI_MEM_ALLOCATE((acpi_size) source_desc->string. ACPI_ALLOCATE((acpi_size) source_desc->string.
length + 1); length + 1);
if (!dest_desc->string.pointer) { if (!dest_desc->string.pointer) {
return (AE_NO_MEMORY); return (AE_NO_MEMORY);
} }
...@@ -805,9 +805,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, ...@@ -805,9 +805,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
/* /*
* Create the object array * Create the object array
*/ */
target_object->package.elements = target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.count + 1) * sizeof(void *));
ACPI_MEM_CALLOCATE(((acpi_size) source_object->package.
count + 1) * sizeof(void *));
if (!target_object->package.elements) { if (!target_object->package.elements) {
status = AE_NO_MEMORY; status = AE_NO_MEMORY;
goto error_exit; goto error_exit;
...@@ -865,10 +863,10 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, ...@@ -865,10 +863,10 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
/* /*
* Create the object array and walk the source package tree * Create the object array and walk the source package tree
*/ */
dest_obj->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) dest_obj->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size)
source_obj->package. source_obj->package.
count + count +
1) * sizeof(void *)); 1) * sizeof(void *));
if (!dest_obj->package.elements) { if (!dest_obj->package.elements) {
ACPI_ERROR((AE_INFO, "Package allocation failure")); ACPI_ERROR((AE_INFO, "Package allocation failure"));
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#define _COMPONENT ACPI_UTILITIES #define _COMPONENT ACPI_UTILITIES
...@@ -164,7 +162,7 @@ acpi_ut_debug_print(u32 requested_debug_level, ...@@ -164,7 +162,7 @@ acpi_ut_debug_print(u32 requested_debug_level,
const char *function_name, const char *function_name,
char *module_name, u32 component_id, char *format, ...) char *module_name, u32 component_id, char *format, ...)
{ {
u32 thread_id; acpi_thread_id thread_id;
va_list args; va_list args;
/* /*
...@@ -179,7 +177,6 @@ acpi_ut_debug_print(u32 requested_debug_level, ...@@ -179,7 +177,6 @@ acpi_ut_debug_print(u32 requested_debug_level,
* Thread tracking and context switch notification * Thread tracking and context switch notification
*/ */
thread_id = acpi_os_get_thread_id(); thread_id = acpi_os_get_thread_id();
if (thread_id != acpi_gbl_prev_thread_id) { if (thread_id != acpi_gbl_prev_thread_id) {
if (ACPI_LV_THREADS & acpi_dbg_level) { if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf acpi_os_printf
...@@ -208,7 +205,7 @@ acpi_ut_debug_print(u32 requested_debug_level, ...@@ -208,7 +205,7 @@ acpi_ut_debug_print(u32 requested_debug_level,
acpi_os_vprintf(format, args); acpi_os_vprintf(format, args);
} }
EXPORT_SYMBOL(acpi_ut_debug_print); ACPI_EXPORT_SYMBOL(acpi_ut_debug_print)
/******************************************************************************* /*******************************************************************************
* *
...@@ -228,7 +225,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print); ...@@ -228,7 +225,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print);
* debug_print so that the same macros can be used. * debug_print so that the same macros can be used.
* *
******************************************************************************/ ******************************************************************************/
void ACPI_INTERNAL_VAR_XFACE void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw(u32 requested_debug_level, acpi_ut_debug_print_raw(u32 requested_debug_level,
u32 line_number, u32 line_number,
...@@ -246,7 +242,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, ...@@ -246,7 +242,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level,
acpi_os_vprintf(format, args); acpi_os_vprintf(format, args);
} }
EXPORT_SYMBOL(acpi_ut_debug_print_raw); ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw)
/******************************************************************************* /*******************************************************************************
* *
...@@ -263,7 +259,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print_raw); ...@@ -263,7 +259,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print_raw);
* set in debug_level * set in debug_level
* *
******************************************************************************/ ******************************************************************************/
void void
acpi_ut_trace(u32 line_number, acpi_ut_trace(u32 line_number,
const char *function_name, char *module_name, u32 component_id) const char *function_name, char *module_name, u32 component_id)
...@@ -277,7 +272,7 @@ acpi_ut_trace(u32 line_number, ...@@ -277,7 +272,7 @@ acpi_ut_trace(u32 line_number,
component_id, "%s\n", acpi_gbl_fn_entry_str); component_id, "%s\n", acpi_gbl_fn_entry_str);
} }
EXPORT_SYMBOL(acpi_ut_trace); ACPI_EXPORT_SYMBOL(acpi_ut_trace)
/******************************************************************************* /*******************************************************************************
* *
...@@ -295,7 +290,6 @@ EXPORT_SYMBOL(acpi_ut_trace); ...@@ -295,7 +290,6 @@ EXPORT_SYMBOL(acpi_ut_trace);
* set in debug_level * set in debug_level
* *
******************************************************************************/ ******************************************************************************/
void void
acpi_ut_trace_ptr(u32 line_number, acpi_ut_trace_ptr(u32 line_number,
const char *function_name, const char *function_name,
...@@ -402,7 +396,7 @@ acpi_ut_exit(u32 line_number, ...@@ -402,7 +396,7 @@ acpi_ut_exit(u32 line_number,
acpi_gbl_nesting_level--; acpi_gbl_nesting_level--;
} }
EXPORT_SYMBOL(acpi_ut_exit); ACPI_EXPORT_SYMBOL(acpi_ut_exit)
/******************************************************************************* /*******************************************************************************
* *
...@@ -420,7 +414,6 @@ EXPORT_SYMBOL(acpi_ut_exit); ...@@ -420,7 +414,6 @@ EXPORT_SYMBOL(acpi_ut_exit);
* set in debug_level. Prints exit status also. * set in debug_level. Prints exit status also.
* *
******************************************************************************/ ******************************************************************************/
void void
acpi_ut_status_exit(u32 line_number, acpi_ut_status_exit(u32 line_number,
const char *function_name, const char *function_name,
...@@ -444,7 +437,7 @@ acpi_ut_status_exit(u32 line_number, ...@@ -444,7 +437,7 @@ acpi_ut_status_exit(u32 line_number,
acpi_gbl_nesting_level--; acpi_gbl_nesting_level--;
} }
EXPORT_SYMBOL(acpi_ut_status_exit); ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
/******************************************************************************* /*******************************************************************************
* *
...@@ -462,7 +455,6 @@ EXPORT_SYMBOL(acpi_ut_status_exit); ...@@ -462,7 +455,6 @@ EXPORT_SYMBOL(acpi_ut_status_exit);
* set in debug_level. Prints exit value also. * set in debug_level. Prints exit value also.
* *
******************************************************************************/ ******************************************************************************/
void void
acpi_ut_value_exit(u32 line_number, acpi_ut_value_exit(u32 line_number,
const char *function_name, const char *function_name,
...@@ -477,7 +469,7 @@ acpi_ut_value_exit(u32 line_number, ...@@ -477,7 +469,7 @@ acpi_ut_value_exit(u32 line_number,
acpi_gbl_nesting_level--; acpi_gbl_nesting_level--;
} }
EXPORT_SYMBOL(acpi_ut_value_exit); ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
/******************************************************************************* /*******************************************************************************
* *
...@@ -495,7 +487,6 @@ EXPORT_SYMBOL(acpi_ut_value_exit); ...@@ -495,7 +487,6 @@ EXPORT_SYMBOL(acpi_ut_value_exit);
* set in debug_level. Prints exit value also. * set in debug_level. Prints exit value also.
* *
******************************************************************************/ ******************************************************************************/
void void
acpi_ut_ptr_exit(u32 line_number, acpi_ut_ptr_exit(u32 line_number,
const char *function_name, const char *function_name,
......
...@@ -236,7 +236,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) ...@@ -236,7 +236,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
if (obj_pointer) { if (obj_pointer) {
ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
"Deleting Object Subptr %p\n", obj_pointer)); "Deleting Object Subptr %p\n", obj_pointer));
ACPI_MEM_FREE(obj_pointer); ACPI_FREE(obj_pointer);
} }
/* Now the object can be safely deleted */ /* Now the object can be safely deleted */
...@@ -275,7 +275,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) ...@@ -275,7 +275,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list)
/* Free the combined parameter pointer list and object array */ /* Free the combined parameter pointer list and object array */
ACPI_MEM_FREE(obj_list); ACPI_FREE(obj_list);
return_VOID; return_VOID;
} }
......
...@@ -461,7 +461,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, ...@@ -461,7 +461,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node,
size = (((count - 1) * sizeof(struct acpi_compatible_id)) + size = (((count - 1) * sizeof(struct acpi_compatible_id)) +
sizeof(struct acpi_compatible_id_list)); sizeof(struct acpi_compatible_id_list));
cid_list = ACPI_MEM_CALLOCATE((acpi_size) size); cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size);
if (!cid_list) { if (!cid_list) {
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
...@@ -502,7 +502,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, ...@@ -502,7 +502,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node,
/* Cleanup on error */ /* Cleanup on error */
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_MEM_FREE(cid_list); ACPI_FREE(cid_list);
} else { } else {
*return_cid_list = cid_list; *return_cid_list = cid_list;
} }
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#define DEFINE_ACPI_GLOBALS #define DEFINE_ACPI_GLOBALS
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
...@@ -144,12 +143,10 @@ const char *acpi_format_exception(acpi_status status) ...@@ -144,12 +143,10 @@ const char *acpi_format_exception(acpi_status status)
/* Debug switch - level and trace mask */ /* Debug switch - level and trace mask */
u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
EXPORT_SYMBOL(acpi_dbg_level);
/* Debug switch - layer (component) mask */ /* Debug switch - layer (component) mask */
u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
EXPORT_SYMBOL(acpi_dbg_layer);
u32 acpi_gbl_nesting_level = 0; u32 acpi_gbl_nesting_level = 0;
/* Debugger globals */ /* Debugger globals */
...@@ -871,3 +868,6 @@ void acpi_ut_init_globals(void) ...@@ -871,3 +868,6 @@ void acpi_ut_init_globals(void)
return_VOID; return_VOID;
} }
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
...@@ -186,14 +186,14 @@ static void acpi_ut_terminate(void) ...@@ -186,14 +186,14 @@ static void acpi_ut_terminate(void)
gpe_block = gpe_xrupt_info->gpe_block_list_head; gpe_block = gpe_xrupt_info->gpe_block_list_head;
while (gpe_block) { while (gpe_block) {
next_gpe_block = gpe_block->next; next_gpe_block = gpe_block->next;
ACPI_MEM_FREE(gpe_block->event_info); ACPI_FREE(gpe_block->event_info);
ACPI_MEM_FREE(gpe_block->register_info); ACPI_FREE(gpe_block->register_info);
ACPI_MEM_FREE(gpe_block); ACPI_FREE(gpe_block);
gpe_block = next_gpe_block; gpe_block = next_gpe_block;
} }
next_gpe_xrupt_info = gpe_xrupt_info->next; next_gpe_xrupt_info = gpe_xrupt_info->next;
ACPI_MEM_FREE(gpe_xrupt_info); ACPI_FREE(gpe_xrupt_info);
gpe_xrupt_info = next_gpe_xrupt_info; gpe_xrupt_info = next_gpe_xrupt_info;
} }
......
...@@ -463,7 +463,7 @@ acpi_ut_display_init_pathname(u8 type, ...@@ -463,7 +463,7 @@ acpi_ut_display_init_pathname(u8 type,
} }
acpi_os_printf("\n"); acpi_os_printf("\n");
ACPI_MEM_FREE(buffer.pointer); ACPI_FREE(buffer.pointer);
} }
#endif #endif
......
...@@ -192,7 +192,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) ...@@ -192,7 +192,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
{ {
acpi_status status; acpi_status status;
u32 this_thread_id; acpi_thread_id this_thread_id;
ACPI_FUNCTION_NAME("ut_acquire_mutex"); ACPI_FUNCTION_NAME("ut_acquire_mutex");
...@@ -275,7 +275,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) ...@@ -275,7 +275,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
{ {
acpi_status status; acpi_status status;
u32 this_thread_id; acpi_thread_id this_thread_id;
ACPI_FUNCTION_NAME("ut_release_mutex"); ACPI_FUNCTION_NAME("ut_release_mutex");
......
...@@ -176,7 +176,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) ...@@ -176,7 +176,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size)
/* Allocate the actual buffer */ /* Allocate the actual buffer */
buffer = ACPI_MEM_CALLOCATE(buffer_size); buffer = ACPI_ALLOCATE_ZEROED(buffer_size);
if (!buffer) { if (!buffer) {
ACPI_ERROR((AE_INFO, "Could not allocate size %X", ACPI_ERROR((AE_INFO, "Could not allocate size %X",
(u32) buffer_size)); (u32) buffer_size));
...@@ -228,7 +228,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) ...@@ -228,7 +228,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
* Allocate the actual string buffer -- (Size + 1) for NULL terminator. * Allocate the actual string buffer -- (Size + 1) for NULL terminator.
* NOTE: Zero-length strings are NULL terminated * NOTE: Zero-length strings are NULL terminated
*/ */
string = ACPI_MEM_CALLOCATE(string_size + 1); string = ACPI_ALLOCATE_ZEROED(string_size + 1);
if (!string) { if (!string) {
ACPI_ERROR((AE_INFO, "Could not allocate size %X", ACPI_ERROR((AE_INFO, "Could not allocate size %X",
(u32) string_size)); (u32) string_size));
...@@ -320,6 +320,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, ...@@ -320,6 +320,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name,
} }
/* Mark the descriptor type */ /* Mark the descriptor type */
memset(object, 0, sizeof(union acpi_operand_object)); memset(object, 0, sizeof(union acpi_operand_object));
ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND);
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
#include <linux/module.h>
#include <acpi/acpi.h> #include <acpi/acpi.h>
#include <acpi/acevents.h> #include <acpi/acevents.h>
#include <acpi/acnamesp.h> #include <acpi/acnamesp.h>
...@@ -109,6 +107,8 @@ acpi_status acpi_initialize_subsystem(void) ...@@ -109,6 +107,8 @@ acpi_status acpi_initialize_subsystem(void)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_enable_subsystem * FUNCTION: acpi_enable_subsystem
...@@ -121,7 +121,6 @@ acpi_status acpi_initialize_subsystem(void) ...@@ -121,7 +121,6 @@ acpi_status acpi_initialize_subsystem(void)
* Puts system into ACPI mode if it isn't already. * Puts system into ACPI mode if it isn't already.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_enable_subsystem(u32 flags) acpi_status acpi_enable_subsystem(u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -229,6 +228,8 @@ acpi_status acpi_enable_subsystem(u32 flags) ...@@ -229,6 +228,8 @@ acpi_status acpi_enable_subsystem(u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_enable_subsystem)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_initialize_objects * FUNCTION: acpi_initialize_objects
...@@ -241,7 +242,6 @@ acpi_status acpi_enable_subsystem(u32 flags) ...@@ -241,7 +242,6 @@ acpi_status acpi_enable_subsystem(u32 flags)
* objects and executing AML code for Regions, buffers, etc. * objects and executing AML code for Regions, buffers, etc.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_initialize_objects(u32 flags) acpi_status acpi_initialize_objects(u32 flags)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
...@@ -305,6 +305,8 @@ acpi_status acpi_initialize_objects(u32 flags) ...@@ -305,6 +305,8 @@ acpi_status acpi_initialize_objects(u32 flags)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_initialize_objects)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_terminate * FUNCTION: acpi_terminate
...@@ -316,7 +318,6 @@ acpi_status acpi_initialize_objects(u32 flags) ...@@ -316,7 +318,6 @@ acpi_status acpi_initialize_objects(u32 flags)
* DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_terminate(void) acpi_status acpi_terminate(void)
{ {
acpi_status status; acpi_status status;
...@@ -348,6 +349,8 @@ acpi_status acpi_terminate(void) ...@@ -348,6 +349,8 @@ acpi_status acpi_terminate(void)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_EXPORT_SYMBOL(acpi_terminate)
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
/******************************************************************************* /*******************************************************************************
* *
...@@ -362,7 +365,6 @@ acpi_status acpi_terminate(void) ...@@ -362,7 +365,6 @@ acpi_status acpi_terminate(void)
* initialized successfully. * initialized successfully.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_subsystem_status(void) acpi_status acpi_subsystem_status(void)
{ {
...@@ -373,6 +375,8 @@ acpi_status acpi_subsystem_status(void) ...@@ -373,6 +375,8 @@ acpi_status acpi_subsystem_status(void)
} }
} }
ACPI_EXPORT_SYMBOL(acpi_subsystem_status)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_get_system_info * FUNCTION: acpi_get_system_info
...@@ -390,7 +394,6 @@ acpi_status acpi_subsystem_status(void) ...@@ -390,7 +394,6 @@ acpi_status acpi_subsystem_status(void)
* and the value of out_buffer is undefined. * and the value of out_buffer is undefined.
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
{ {
struct acpi_system_info *info_ptr; struct acpi_system_info *info_ptr;
...@@ -456,7 +459,7 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) ...@@ -456,7 +459,7 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
EXPORT_SYMBOL(acpi_get_system_info); ACPI_EXPORT_SYMBOL(acpi_get_system_info)
/***************************************************************************** /*****************************************************************************
* *
...@@ -472,7 +475,6 @@ EXPORT_SYMBOL(acpi_get_system_info); ...@@ -472,7 +475,6 @@ EXPORT_SYMBOL(acpi_get_system_info);
* TBD: When a second function is added, must save the Function also. * TBD: When a second function is added, must save the Function also.
* *
****************************************************************************/ ****************************************************************************/
acpi_status acpi_status
acpi_install_initialization_handler(acpi_init_handler handler, u32 function) acpi_install_initialization_handler(acpi_init_handler handler, u32 function)
{ {
...@@ -489,6 +491,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) ...@@ -489,6 +491,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function)
return AE_OK; return AE_OK;
} }
ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler)
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/***************************************************************************** /*****************************************************************************
...@@ -502,7 +505,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) ...@@ -502,7 +505,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function)
* DESCRIPTION: Empty all caches (delete the cached objects) * DESCRIPTION: Empty all caches (delete the cached objects)
* *
****************************************************************************/ ****************************************************************************/
acpi_status acpi_purge_cached_objects(void) acpi_status acpi_purge_cached_objects(void)
{ {
ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); ACPI_FUNCTION_TRACE("acpi_purge_cached_objects");
...@@ -513,3 +515,5 @@ acpi_status acpi_purge_cached_objects(void) ...@@ -513,3 +515,5 @@ acpi_status acpi_purge_cached_objects(void)
(void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache);
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects)
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */ /* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20060217 #define ACPI_CA_VERSION 0x20060310
/* /*
* OS name, used for the _OS object. The _OS object is essentially obsolete, * OS name, used for the _OS object. The _OS object is essentially obsolete,
...@@ -102,9 +102,9 @@ ...@@ -102,9 +102,9 @@
#define ACPI_MAX_SEMAPHORE_COUNT 256 #define ACPI_MAX_SEMAPHORE_COUNT 256
/* Max reference count (for debug only) */ /* Maximum object reference count (detects object deletion issues) */
#define ACPI_MAX_REFERENCE_COUNT 0x400 #define ACPI_MAX_REFERENCE_COUNT 0x800
/* Size of cached memory mapping for system memory operation region */ /* Size of cached memory mapping for system memory operation region */
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#define BLOCK_PAREN 1 #define BLOCK_PAREN 1
#define BLOCK_BRACE 2 #define BLOCK_BRACE 2
#define BLOCK_COMMA_LIST 4 #define BLOCK_COMMA_LIST 4
#define ACPI_DEFAULT_RESNAME *(u32 *) "__RD"
struct acpi_external_list { struct acpi_external_list {
char *path; char *path;
...@@ -78,6 +79,11 @@ typedef ...@@ -78,6 +79,11 @@ typedef
acpi_status(*asl_walk_callback) (union acpi_parse_object * op, acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
u32 level, void *context); u32 level, void *context);
struct acpi_resource_tag {
u32 bit_index;
char *tag;
};
/* /*
* dmwalk * dmwalk
*/ */
...@@ -85,6 +91,11 @@ void ...@@ -85,6 +91,11 @@ void
acpi_dm_disassemble(struct acpi_walk_state *walk_state, acpi_dm_disassemble(struct acpi_walk_state *walk_state,
union acpi_parse_object *origin, u32 num_opcodes); union acpi_parse_object *origin, u32 num_opcodes);
void
acpi_dm_walk_parse_tree(union acpi_parse_object *op,
asl_walk_callback descending_callback,
asl_walk_callback ascending_callback, void *context);
/* /*
* dmopcode * dmopcode
*/ */
...@@ -167,6 +178,7 @@ void acpi_dm_dump_integer64(u64 value, char *name); ...@@ -167,6 +178,7 @@ void acpi_dm_dump_integer64(u64 value, char *name);
void void
acpi_dm_resource_template(struct acpi_op_walk_info *info, acpi_dm_resource_template(struct acpi_op_walk_info *info,
union acpi_parse_object *op,
u8 * byte_data, u32 byte_count); u8 * byte_data, u32 byte_count);
u8 acpi_dm_is_resource_template(union acpi_parse_object *op); u8 acpi_dm_is_resource_template(union acpi_parse_object *op);
...@@ -177,6 +189,8 @@ void acpi_dm_bit_list(u16 mask); ...@@ -177,6 +189,8 @@ void acpi_dm_bit_list(u16 mask);
void acpi_dm_decode_attribute(u8 attribute); void acpi_dm_decode_attribute(u8 attribute);
void acpi_dm_descriptor_name(void);
/* /*
* dmresrcl * dmresrcl
*/ */
...@@ -251,4 +265,13 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource, ...@@ -251,4 +265,13 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource,
*/ */
void acpi_dm_add_to_external_list(char *path); void acpi_dm_add_to_external_list(char *path);
/*
* dmrestag
*/
void acpi_dm_find_resources(union acpi_parse_object *root);
void
acpi_dm_check_resource_reference(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
#endif /* __ACDISASM_H__ */ #endif /* __ACDISASM_H__ */
...@@ -129,7 +129,7 @@ typedef u8 acpi_owner_id; ...@@ -129,7 +129,7 @@ typedef u8 acpi_owner_id;
struct acpi_mutex_info { struct acpi_mutex_info {
acpi_mutex mutex; acpi_mutex mutex;
u32 use_count; u32 use_count;
u32 thread_id; acpi_thread_id thread_id;
}; };
/* Lock flag parameter for various interfaces */ /* Lock flag parameter for various interfaces */
...@@ -181,9 +181,9 @@ struct acpi_namespace_node { ...@@ -181,9 +181,9 @@ struct acpi_namespace_node {
u8 owner_id; /* Who created this node */ u8 owner_id; /* Who created this node */
u8 flags; u8 flags;
/* Fields used by the ASL compiler only */ /* Fields used by the ASL compiler and disassembler only */
#ifdef ACPI_ASL_COMPILER #ifdef ACPI_LARGE_NAMESPACE_NODE
u32 value; u32 value;
union acpi_parse_object *op; union acpi_parse_object *op;
#endif #endif
...@@ -479,7 +479,7 @@ struct acpi_pscope_state { ...@@ -479,7 +479,7 @@ struct acpi_pscope_state {
struct acpi_thread_state { struct acpi_thread_state {
ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
u32 thread_id; /* Running thread ID */ acpi_thread_id thread_id; /* Running thread ID */
u8 current_sync_level; /* Mutex Sync (nested acquire) level */ u8 current_sync_level; /* Mutex Sync (nested acquire) level */
}; };
......
...@@ -713,18 +713,18 @@ ...@@ -713,18 +713,18 @@
/* Memory allocation */ /* Memory allocation */
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_MEM_FREE(a) acpi_os_free(a) #define ACPI_FREE(a) acpi_os_free(a)
#define ACPI_MEM_TRACKING(a) #define ACPI_MEM_TRACKING(a)
#else #else
/* Memory allocation */ /* Memory allocation */
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) #define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) #define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_MEM_TRACKING(a) a #define ACPI_MEM_TRACKING(a) a
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
#define ACPI_NS_DONT_OPEN_SCOPE 0x02 #define ACPI_NS_DONT_OPEN_SCOPE 0x02
#define ACPI_NS_NO_PEER_SEARCH 0x04 #define ACPI_NS_NO_PEER_SEARCH 0x04
#define ACPI_NS_ERROR_IF_FOUND 0x08 #define ACPI_NS_ERROR_IF_FOUND 0x08
#define ACPI_NS_PREFIX_IS_SCOPE 0x10
#define ACPI_NS_WALK_UNLOCK TRUE #define ACPI_NS_WALK_UNLOCK TRUE
#define ACPI_NS_WALK_NO_UNLOCK FALSE #define ACPI_NS_WALK_NO_UNLOCK FALSE
...@@ -184,6 +185,10 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info); ...@@ -184,6 +185,10 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info);
*/ */
u32 acpi_ns_opens_scope(acpi_object_type type); u32 acpi_ns_opens_scope(acpi_object_type type);
void
acpi_ns_build_external_path(struct acpi_namespace_node *node,
acpi_size size, char *name_buffer);
char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node); char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state); char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
......
...@@ -161,7 +161,7 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); ...@@ -161,7 +161,7 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
/* /*
* Threads and Scheduling * Threads and Scheduling
*/ */
u32 acpi_os_get_thread_id(void); acpi_thread_id acpi_os_get_thread_id(void);
acpi_status acpi_status
acpi_os_queue_for_execution(u32 priority, acpi_os_queue_for_execution(u32 priority,
......
...@@ -288,6 +288,21 @@ typedef acpi_native_uint acpi_size; ...@@ -288,6 +288,21 @@ typedef acpi_native_uint acpi_size;
#define ACPI_UNUSED_VAR #define ACPI_UNUSED_VAR
#endif #endif
/*
* All ACPICA functions that are available to the rest of the kernel are
* tagged with this macro which can be defined as appropriate for the host.
*/
#ifndef ACPI_EXPORT_SYMBOL
#define ACPI_EXPORT_SYMBOL(symbol)
#endif
/*
* thread_id is returned by acpi_os_get_thread_id.
*/
#ifndef acpi_thread_id
#define acpi_thread_id acpi_native_uint
#endif
/******************************************************************************* /*******************************************************************************
* *
* Independent types * Independent types
......
...@@ -45,36 +45,36 @@ ...@@ -45,36 +45,36 @@
#ifndef __AMLRESRC_H #ifndef __AMLRESRC_H
#define __AMLRESRC_H #define __AMLRESRC_H
#define ASL_RESNAME_ADDRESS "_ADR" #define ACPI_RESTAG_ADDRESS "_ADR"
#define ASL_RESNAME_ALIGNMENT "_ALN" #define ACPI_RESTAG_ALIGNMENT "_ALN"
#define ASL_RESNAME_ADDRESSSPACE "_ASI" #define ACPI_RESTAG_ADDRESSSPACE "_ASI"
#define ASL_RESNAME_ACCESSSIZE "_ASZ" #define ACPI_RESTAG_ACCESSSIZE "_ASZ"
#define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT" #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT"
#define ASL_RESNAME_BASEADDRESS "_BAS" #define ACPI_RESTAG_BASEADDRESS "_BAS"
#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */
#define ASL_RESNAME_DECODE "_DEC" #define ACPI_RESTAG_DECODE "_DEC"
#define ASL_RESNAME_DMA "_DMA" #define ACPI_RESTAG_DMA "_DMA"
#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
#define ASL_RESNAME_GRANULARITY "_GRA" #define ACPI_RESTAG_GRANULARITY "_GRA"
#define ASL_RESNAME_INTERRUPT "_INT" #define ACPI_RESTAG_INTERRUPT "_INT"
#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */
#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
#define ASL_RESNAME_LENGTH "_LEN" #define ACPI_RESTAG_LENGTH "_LEN"
#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ASL_RESNAME_MAXADDR "_MAX" #define ACPI_RESTAG_MAXADDR "_MAX"
#define ASL_RESNAME_MINADDR "_MIN" #define ACPI_RESTAG_MINADDR "_MIN"
#define ASL_RESNAME_MAXTYPE "_MAF" #define ACPI_RESTAG_MAXTYPE "_MAF"
#define ASL_RESNAME_MINTYPE "_MIF" #define ACPI_RESTAG_MINTYPE "_MIF"
#define ASL_RESNAME_REGISTERBITOFFSET "_RBO" #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
#define ASL_RESNAME_REGISTERBITWIDTH "_RBW" #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
#define ASL_RESNAME_RANGETYPE "_RNG" #define ACPI_RESTAG_RANGETYPE "_RNG"
#define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */
#define ASL_RESNAME_TRANSLATION "_TRA" #define ACPI_RESTAG_TRANSLATION "_TRA"
#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ #define ACPI_RESTAG_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */
/* Default sizes for "small" resource descriptors */ /* Default sizes for "small" resource descriptors */
...@@ -266,6 +266,7 @@ struct aml_resource_generic_register { ...@@ -266,6 +266,7 @@ struct aml_resource_generic_register {
union aml_resource { union aml_resource {
/* Descriptor headers */ /* Descriptor headers */
u8 descriptor_type;
struct aml_resource_small_header small_header; struct aml_resource_small_header small_header;
struct aml_resource_large_header large_header; struct aml_resource_large_header large_header;
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#define ACPI_APPLICATION #define ACPI_APPLICATION
#define ACPI_DISASSEMBLER #define ACPI_DISASSEMBLER
#define ACPI_NO_METHOD_EXECUTION #define ACPI_NO_METHOD_EXECUTION
#define ACPI_LARGE_NAMESPACE_NODE
#endif #endif
#ifdef ACPI_EXEC_APP #ifdef ACPI_EXEC_APP
...@@ -76,6 +77,7 @@ ...@@ -76,6 +77,7 @@
#define ACPI_APPLICATION #define ACPI_APPLICATION
#define ACPI_DISASSEMBLER #define ACPI_DISASSEMBLER
#define ACPI_CONSTANT_EVAL_ONLY #define ACPI_CONSTANT_EVAL_ONLY
#define ACPI_LARGE_NAMESPACE_NODE
#endif #endif
#ifdef ACPI_APPLICATION #ifdef ACPI_APPLICATION
...@@ -271,8 +273,8 @@ typedef char *va_list; ...@@ -271,8 +273,8 @@ typedef char *va_list;
/* /*
* Storage alignment properties * Storage alignment properties
*/ */
#define _AUPBND (sizeof (acpi_native_uint) - 1) #define _AUPBND (sizeof (acpi_native_int) - 1)
#define _ADNBND (sizeof (acpi_native_uint) - 1) #define _ADNBND (sizeof (acpi_native_int) - 1)
/* /*
* Variable argument list macro definitions * Variable argument list macro definitions
......
...@@ -52,27 +52,22 @@ ...@@ -52,27 +52,22 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/acpi.h> #include <asm/acpi.h>
#include <linux/slab.h>
#define strtoul simple_strtoul /* Host-dependent types and defines */
#define ACPI_MACHINE_WIDTH BITS_PER_LONG
/* Type(s) for the OSL */ #define ACPI_MACHINE_WIDTH BITS_PER_LONG
#define acpi_cache_t kmem_cache_t
#ifdef ACPI_USE_LOCAL_CACHE #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol);
#define acpi_cache_t struct acpi_memory_list #define strtoul simple_strtoul
#else
#include <linux/slab.h>
#define acpi_cache_t kmem_cache_t
#endif
/* Full namespace pathname length limit - arbitrary */ /* Full namespace pathname length limit - arbitrary */
#define ACPI_PATHNAME_MAX 256 #define ACPI_PATHNAME_MAX 256
#else /* !__KERNEL__ */ #else /* !__KERNEL__ */
......
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