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: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
index f7cb517..2ed4843 100644
--- a/drivers/acpi/dispatcher/dsmthdat.c
+++ b/drivers/acpi/dispatcher/dsmthdat.c
@@ -81,7 +81,7 @@
  *              special data types.
  *
  * 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
  *              so that ref_of() can return a pointer to the Node.
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
index 1f2d0c6..ce54715 100644
--- a/drivers/acpi/dispatcher/dsobject.c
+++ b/drivers/acpi/dispatcher/dsobject.c
@@ -245,7 +245,7 @@
 				  "Buffer defined with zero length in AML, creating\n"));
 	} else {
 		obj_desc->buffer.pointer =
-		    ACPI_MEM_CALLOCATE(obj_desc->buffer.length);
+		    ACPI_ALLOCATE_ZEROED(obj_desc->buffer.length);
 		if (!obj_desc->buffer.pointer) {
 			acpi_ut_delete_object_desc(obj_desc);
 			return_ACPI_STATUS(AE_NO_MEMORY);
@@ -341,9 +341,10 @@
 	 * individual objects). Add an extra pointer slot so
 	 * that the list is always null terminated.
 	 */
-	obj_desc->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) obj_desc->
-							 package.count +
-							 1) * sizeof(void *));
+	obj_desc->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size)
+							   obj_desc->package.
+							   count +
+							   1) * sizeof(void *));
 
 	if (!obj_desc->package.elements) {
 		acpi_ut_delete_object_desc(obj_desc);
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
index 3fbe17e..ab24aa8 100644
--- a/drivers/acpi/dispatcher/dsutils.c
+++ b/drivers/acpi/dispatcher/dsutils.c
@@ -577,7 +577,7 @@
 
 		/* Free the namestring created above */
 
-		ACPI_MEM_FREE(name_string);
+		ACPI_FREE(name_string);
 
 		/* Check status from the lookup */
 
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
index 02b0312..1ad7870 100644
--- a/drivers/acpi/dispatcher/dswload.c
+++ b/drivers/acpi/dispatcher/dswload.c
@@ -1113,7 +1113,6 @@
 				   ACPI_NS_DONT_OPEN_SCOPE, walk_state,
 				   &(new_node));
 		if (ACPI_SUCCESS(status)) {
-
 			/*
 			 * Make sure that what we found is indeed a method
 			 * We didn't search for a method on purpose, to see if the name
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
index 5bc340b..d2846ff 100644
--- a/drivers/acpi/dispatcher/dswstate.c
+++ b/drivers/acpi/dispatcher/dswstate.c
@@ -66,7 +66,6 @@
 #endif
 
 #ifdef ACPI_FUTURE_USAGE
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ds_result_remove
@@ -128,7 +127,6 @@
 
 	return (AE_OK);
 }
-
 #endif				/*  ACPI_FUTURE_USAGE  */
 
 /*******************************************************************************
@@ -645,7 +643,7 @@
 
 	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) {
 		return_PTR(NULL);
 	}
@@ -668,7 +666,7 @@
 
 	status = acpi_ds_result_stack_push(walk_state);
 	if (ACPI_FAILURE(status)) {
-		ACPI_MEM_FREE(walk_state);
+		ACPI_FREE(walk_state);
 		return_PTR(NULL);
 	}
 
@@ -859,7 +857,7 @@
 		acpi_ut_delete_generic_state(state);
 	}
 
-	ACPI_MEM_FREE(walk_state);
+	ACPI_FREE(walk_state);
 	return_VOID;
 }