rpms/kernel/FC-4 linux-2.6-acpi-rollup-20050902.patch, NONE, 1.1 kernel-2.6.spec, 1.1449, 1.1450

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Sep 2 22:22:28 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv26010

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-acpi-rollup-20050902.patch 
Log Message:
ACPI fixes de jour.


linux-2.6-acpi-rollup-20050902.patch:
 ./drivers/acpi/dispatcher/dsmethod.c                    |   51 -
 ./drivers/acpi/parser/psparse.c                         |   24 
 ./drivers/acpi/parser/psxface.c                         |   14 
 ./drivers/acpi/utilities/utmisc.c                       |    3 
 ./include/acpi/acdispat.h                               |    2 
 2.6.13-acpica/drivers/acpi/dispatcher/dsmethod.c        |   51 -
 2.6.13-acpica/drivers/acpi/parser/psparse.c             |   24 
 2.6.13-acpica/drivers/acpi/parser/psxface.c             |   14 
 2.6.13-acpica/drivers/acpi/utilities/utmisc.c           |    3 
 2.6.13-acpica/include/acpi/acdispat.h                   |    2 
 2.6.13/drivers/acpi/tables/tbutils.c                    |   22 
 2.6.13/drivers/acpi/utilities/utdebug.c                 |    4 
 2.6.13/drivers/acpi/utilities/utmisc.c                  |    6 
 2.6.13/include/acpi/acconfig.h                          |    2 
 2.6.13/include/acpi/acnames.h                           |   14 
 acpica-unix-20050902/drivers/acpi/dispatcher/dsmethod.c |   72 +-
 acpica-unix-20050902/drivers/acpi/dispatcher/dswload.c  |    5 
 acpica-unix-20050902/drivers/acpi/parser/psparse.c      |   23 
 acpica-unix-20050902/drivers/acpi/parser/psxface.c      |   14 
 acpica-unix-20050902/drivers/acpi/resources/rsaddr.c    |  572 +++++++---------
 acpica-unix-20050902/drivers/acpi/resources/rsirq.c     |   21 
 acpica-unix-20050902/drivers/acpi/utilities/utmisc.c    |   13 
 acpica-unix-20050902/include/acpi/acconfig.h            |    2 
 acpica-unix-20050902/include/acpi/acdispat.h            |    2 
 acpica-unix-20050902/include/acpi/actypes.h             |   37 -
 b/drivers/acpi/parser/psloop.c                          |    2 
 26 files changed, 498 insertions(+), 501 deletions(-)

--- NEW FILE linux-2.6-acpi-rollup-20050902.patch ---
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c
--- a/drivers/acpi/parser/psloop.c
+++ b/drivers/acpi/parser/psloop.c
@@ -410,6 +410,8 @@ acpi_ps_parse_loop (
 
 				/* Special processing for certain opcodes */
 
+#define ACPI_NO_MODULE_LEVEL_CODE
+
 	/* TBD (remove): Temporary mechanism to disable this code if needed */
 
 #ifndef ACPI_NO_MODULE_LEVEL_CODE
diff -ru /home/aystarik/reference/linux-2.6.12/drivers/acpi/dispatcher/dsmethod.c ./drivers/acpi/dispatcher/dsmethod.c
--- /home/aystarik/reference/linux-2.6.12/drivers/acpi/dispatcher/dsmethod.c	2005-08-25 13:53:50.000000000 +0400
+++ ./drivers/acpi/dispatcher/dsmethod.c	2005-08-26 23:21:14.000000000 +0400
@@ -243,6 +243,15 @@
 		status = acpi_ex_system_wait_semaphore (obj_desc->method.semaphore,
 				 ACPI_WAIT_FOREVER);
 	}
+	/*
+	 * allocate owner id for this method
+	*/
+	if (!obj_desc->method.thread_count) {
+		status = acpi_ut_allocate_owner_id (&obj_desc->method.owner_id);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
+	}
 
 	/*
 	 * Increment the method parse tree thread count since it has been
@@ -299,11 +308,6 @@
 		return_ACPI_STATUS (AE_NULL_OBJECT);
 	}
 
-	status = acpi_ut_allocate_owner_id (&obj_desc->method.owner_id);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
-
 	/* Init for new method, wait on concurrency semaphore */
 
 	status = acpi_ds_begin_method_execution (method_node, obj_desc,
@@ -387,23 +391,17 @@
 
 	if (obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) {
 		status = obj_desc->method.implementation (next_walk_state);
-		return_ACPI_STATUS (status);
 	}
-
-	return_ACPI_STATUS (AE_OK);
-
-
-	/* On error, we must delete the new walk state */
-
+	goto end;
 cleanup:
-	acpi_ut_release_owner_id (&obj_desc->method.owner_id);
+	/* Decrement the thread count on the method parse tree */
 	if (next_walk_state && (next_walk_state->method_desc)) {
-		/* Decrement the thread count on the method parse tree */
-
-	   next_walk_state->method_desc->method.thread_count--;
+		next_walk_state->method_desc->method.thread_count--;
 	}
-	(void) acpi_ds_terminate_control_method (next_walk_state);
+	/* On error, we must delete the new walk state */
+	acpi_ds_terminate_control_method (next_walk_state);
 	acpi_ds_delete_walk_state (next_walk_state);
+end:
 	return_ACPI_STATUS (status);
 }
 
@@ -491,7 +489,7 @@
  *
  * PARAMETERS:  walk_state          - State of the method
  *
- * RETURN:      Status
+ * RETURN:      None
  *
  * DESCRIPTION: Terminate a control method.  Delete everything that the method
  *              created, delete all locals and arguments, and delete the parse
@@ -499,7 +497,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+void
 acpi_ds_terminate_control_method (
 	struct acpi_walk_state          *walk_state)
 {
@@ -512,14 +510,14 @@
 
 
 	if (!walk_state) {
-		return (AE_BAD_PARAMETER);
+		return_VOID;
 	}
 
 	/* The current method object was saved in the walk state */
 
 	obj_desc = walk_state->method_desc;
 	if (!obj_desc) {
-		return_ACPI_STATUS (AE_OK);
+		return_VOID;
 	}
 
 	/* Delete all arguments and locals */
@@ -533,7 +531,7 @@
 	 */
 	status = acpi_ut_acquire_mutex (ACPI_MTX_PARSER);
 	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
+		return_VOID;
 	}
 
 	/* Signal completion of the execution of this method if necessary */
@@ -586,7 +584,7 @@
 		 */
 		status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
 		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
+			goto cleanup;
 		}
 
 		if (method_node->child) {
@@ -602,12 +600,11 @@
 		acpi_ut_release_owner_id (&walk_state->method_desc->method.owner_id);
 
 		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
+			goto cleanup;
 		}
 	}
-
-	status = acpi_ut_release_mutex (ACPI_MTX_PARSER);
-	return_ACPI_STATUS (status);
+cleanup:
+	acpi_ut_release_mutex (ACPI_MTX_PARSER);
 }
 
 
diff -ru /home/aystarik/reference/linux-2.6.12/drivers/acpi/parser/psparse.c ./drivers/acpi/parser/psparse.c
--- /home/aystarik/reference/linux-2.6.12/drivers/acpi/parser/psparse.c	2005-08-25 13:53:50.000000000 +0400
+++ ./drivers/acpi/parser/psparse.c	2005-08-26 23:40:25.000000000 +0400
@@ -437,7 +437,6 @@
 	struct acpi_walk_state          *walk_state)
 {
 	acpi_status                     status;
-	acpi_status                     terminate_status;
 	struct acpi_thread_state        *thread;
 	struct acpi_thread_state        *prev_walk_list = acpi_gbl_current_walk_list;
 	struct acpi_walk_state          *previous_walk_state;
@@ -507,7 +506,10 @@
 		else if ((status != AE_OK) && (walk_state->method_desc)) {
 			ACPI_REPORT_METHOD_ERROR ("Method execution failed",
 				walk_state->method_node, NULL, status);
-
+			
+			/* Make sure that failed method will be cleaned as if it was executed */
+			walk_state->parse_flags |= ACPI_PARSE_EXECUTE;
+			
 			/* Check for possible multi-thread reentrancy problem */
 
 			if ((status == AE_ALREADY_EXISTS) &&
@@ -523,14 +525,6 @@
 			}
 		}
 
-		if (walk_state->method_desc) {
-			/* Decrement the thread count on the method parse tree */
-
-			if (walk_state->method_desc->method.thread_count) {
-				walk_state->method_desc->method.thread_count--;
-			}
-		}
-
 		/* We are done with this walk, move on to the parent if any */
 
 		walk_state = acpi_ds_pop_walk_state (thread);
@@ -544,13 +538,11 @@
 		 * there's lots of cleanup to do
 		 */
 		if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) {
-			terminate_status = acpi_ds_terminate_control_method (walk_state);
-			if (ACPI_FAILURE (terminate_status)) {
-				ACPI_REPORT_ERROR ((
-					"Could not terminate control method properly\n"));
-
-				/* Ignore error and continue */
+			/* Decrement the thread count on the method parse tree */
+			if (walk_state->method_desc) {
+				walk_state->method_desc->method.thread_count--;
 			}
+			acpi_ds_terminate_control_method (walk_state);
 		}
 
 		/* Delete this walk state and all linked control states */
diff -ru /home/aystarik/reference/linux-2.6.12/drivers/acpi/parser/psxface.c ./drivers/acpi/parser/psxface.c
[...1617 lines suppressed...]
 	buffer += 1;
 	ACPI_MOVE_16_TO_16 (&temp16, buffer);
@@ -415,7 +415,7 @@
 		/* Copy the string into the buffer */
 
 		index = 0;
-		while (0x00 != *buffer) {
+		while (*buffer) {
 			*temp_ptr = *buffer;
 
 			temp_ptr += 1;
@@ -425,7 +425,7 @@
 
 		/* Add the terminating null */
 
-		*temp_ptr = 0x00;
+		*temp_ptr = 0;
 		output_struct->data.extended_irq.resource_source.string_length = index + 1;
 
 		/*
@@ -437,7 +437,7 @@
 		struct_size += ACPI_ROUND_UP_to_32_bITS (temp8);
 	}
 	else {
-		output_struct->data.extended_irq.resource_source.index = 0x00;
+		output_struct->data.extended_irq.resource_source.index = 0;
 		output_struct->data.extended_irq.resource_source.string_length = 0;
 		output_struct->data.extended_irq.resource_source.string_ptr = NULL;
 	}
@@ -479,18 +479,17 @@
 	u16                             *length_field;
 	u8                              temp8 = 0;
 	u8                              index;
-	char                            *temp_pointer = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("rs_extended_irq_stream");
 
 
-	/* The descriptor field is static */
+	/* Set the Descriptor Type field */
 
-	*buffer = 0x89;
+	*buffer = ACPI_RDESC_TYPE_EXTENDED_XRUPT;
 	buffer += 1;
 
-	/* Set a pointer to the Length field - to be filled in later */
+	/* Save a pointer to the Length field - to be filled in later */
 
 	length_field = ACPI_CAST_PTR (u16, buffer);
 	buffer += 2;
@@ -540,15 +539,13 @@
 		*buffer = (u8) linked_list->data.extended_irq.resource_source.index;
 		buffer += 1;
 
-		temp_pointer = (char *) buffer;
-
 		/* Copy the string */
 
-		ACPI_STRCPY (temp_pointer,
+		ACPI_STRCPY ((char *) buffer,
 			linked_list->data.extended_irq.resource_source.string_ptr);
 
 		/*
-		 * Buffer needs to be set to the length of the sting + one for the
+		 * Buffer needs to be set to the length of the string + one for the
 		 * terminating null
 		 */
 		buffer += (acpi_size) (ACPI_STRLEN (
diff -u -r acpica-unix-20050815/drivers/acpi/utilities/utmisc.c acpica-unix-20050902/drivers/acpi/utilities/utmisc.c
--- acpica-unix-20050815/drivers/acpi/utilities/utmisc.c	2005-09-02 15:47:48.000000000 -0400
+++ acpica-unix-20050902/drivers/acpi/utilities/utmisc.c	2005-09-02 17:47:03.000000000 -0400
@@ -75,6 +75,13 @@
 	ACPI_FUNCTION_TRACE ("ut_allocate_owner_id");
 
 
+	/* Guard against multiple allocations of ID to the same location */
+
+	if (*owner_id) {
+		ACPI_REPORT_ERROR (("Owner ID [%2.2X] already exists\n", *owner_id));
+		return_ACPI_STATUS (AE_ALREADY_EXISTS);
+	}
+
 	/* Mutex for the global ID mask */
 
 	status = acpi_ut_acquire_mutex (ACPI_MTX_CACHES);
@@ -88,7 +95,7 @@
 		if (!(acpi_gbl_owner_id_mask & (1 << i))) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_VALUES,
 				"Current owner_id mask: %8.8X New ID: %2.2X\n",
-				acpi_gbl_owner_id_mask, (i + 1)));
+				acpi_gbl_owner_id_mask, (unsigned int) (i + 1)));
 
 			acpi_gbl_owner_id_mask |= (1 << i);
 			*owner_id = (acpi_owner_id) (i + 1);
@@ -157,7 +164,9 @@
 		return_VOID;
 	}
 
-	owner_id--; /* Normalize to zero */
+	/* Normalize the ID to zero */
+
+	owner_id--;
 
 	/* Free the owner ID only if it is valid */
 
diff -u -r acpica-unix-20050815/include/acpi/acconfig.h acpica-unix-20050902/include/acpi/acconfig.h
--- acpica-unix-20050815/include/acpi/acconfig.h	2005-09-02 15:47:45.000000000 -0400
+++ acpica-unix-20050902/include/acpi/acconfig.h	2005-09-02 17:47:00.000000000 -0400
@@ -64,7 +64,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20050815
+#define ACPI_CA_VERSION                 0x20050902
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
diff -u -r acpica-unix-20050815/include/acpi/acdispat.h acpica-unix-20050902/include/acpi/acdispat.h
--- acpica-unix-20050815/include/acpi/acdispat.h	2005-09-02 15:47:45.000000000 -0400
+++ acpica-unix-20050902/include/acpi/acdispat.h	2005-09-02 17:47:00.000000000 -0400
@@ -249,7 +249,7 @@
 	struct acpi_walk_state          *walk_state,
 	union acpi_operand_object       *return_desc);
 
-acpi_status
+void
 acpi_ds_terminate_control_method (
 	struct acpi_walk_state          *walk_state);
 
diff -u -r acpica-unix-20050815/include/acpi/actypes.h acpica-unix-20050902/include/acpi/actypes.h
--- acpica-unix-20050815/include/acpi/actypes.h	2005-09-02 15:47:45.000000000 -0400
+++ acpica-unix-20050902/include/acpi/actypes.h	2005-09-02 17:47:00.000000000 -0400
@@ -1170,14 +1170,24 @@
 	char                                *string_ptr;
 };
 
+/* Fields common to all address descriptors, 16/32/64 bit */
+
+#define ACPI_RESOURCE_ADDRESS_COMMON \
+	u32                                 resource_type; \
+	u32                                 producer_consumer; \
+	u32                                 decode; \
+	u32                                 min_address_fixed; \
+	u32                                 max_address_fixed; \
+	union acpi_resource_attribute       attribute;
+
+struct acpi_resource_address
+{
+	ACPI_RESOURCE_ADDRESS_COMMON
+};
+
 struct acpi_resource_address16
 {
-	u32                                 resource_type;
-	u32                                 producer_consumer;
-	u32                                 decode;
-	u32                                 min_address_fixed;
-	u32                                 max_address_fixed;
-	union acpi_resource_attribute       attribute;
+	ACPI_RESOURCE_ADDRESS_COMMON
 	u32                                 granularity;
 	u32                                 min_address_range;
 	u32                                 max_address_range;
@@ -1188,12 +1198,7 @@
 
 struct acpi_resource_address32
 {
-	u32                                 resource_type;
-	u32                                 producer_consumer;
-	u32                                 decode;
-	u32                                 min_address_fixed;
-	u32                                 max_address_fixed;
-	union acpi_resource_attribute       attribute;
+	ACPI_RESOURCE_ADDRESS_COMMON
 	u32                                 granularity;
 	u32                                 min_address_range;
 	u32                                 max_address_range;
@@ -1204,12 +1209,7 @@
 
 struct acpi_resource_address64
 {
-	u32                                 resource_type;
-	u32                                 producer_consumer;
-	u32                                 decode;
-	u32                                 min_address_fixed;
-	u32                                 max_address_fixed;
-	union acpi_resource_attribute       attribute;
+	ACPI_RESOURCE_ADDRESS_COMMON
 	u64                                 granularity;
 	u64                                 min_address_range;
 	u64                                 max_address_range;
@@ -1263,6 +1263,7 @@
 	struct acpi_resource_mem24          memory24;
 	struct acpi_resource_mem32          memory32;
 	struct acpi_resource_fixed_mem32    fixed_memory32;
+	struct acpi_resource_address        address;        /* Common 16/32/64 address fields */
 	struct acpi_resource_address16      address16;
 	struct acpi_resource_address32      address32;
 	struct acpi_resource_address64      address64;


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1449
retrieving revision 1.1450
diff -u -r1.1449 -r1.1450
--- kernel-2.6.spec	31 Aug 2005 01:51:55 -0000	1.1449
+++ kernel-2.6.spec	2 Sep 2005 22:22:25 -0000	1.1450
@@ -357,6 +357,7 @@
 
 Patch2100: linux-2.6-acpi-20050729.patch.bz2
 Patch2101: linux-2.6-acpi-xen.patch
+Patch2102: linux-2.6-acpi-rollup-20050902.patch
 Patch2110: linux-2.6.11-acpi-thinkpad-c2c3.patch
 
 Patch2200: linux-2.6-alsa-snd-intel8x0m-semaphore.patch
@@ -833,6 +834,8 @@
 %if %{includexen}
 %patch2101 -p1
 %endif
+# Various ACPI fixes from post 2.6.13
+%patch2102 -p1
 # Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
 %patch2110 -p1
 
@@ -1286,6 +1289,9 @@
 %endif
 
 %changelog
+* Fri Sep  2 2005 Dave Jones <davej at redhat.com>
+- Various post 2.6.13 ACPI updates. (20050902)
+
 * Mon Aug 29 2005 Dave Jones <davej at redhat.com>
 - Fix local builds when '-' is in the hostname.
 - Update ALPS driver to 2.6.13 level.




More information about the fedora-cvs-commits mailing list