[kernel/f14/master] - linux-2.6-acpi-fix-alias.patch: Fix ACPI object aliasing (#608648)

Matthew Garrett mjg59 at fedoraproject.org
Wed Feb 9 17:16:48 UTC 2011


commit c7ff2c5553bbbb1f7f689f67e66af4d3d8a4c3a3
Author: Matthew Garrett <mjg at redhat.com>
Date:   Wed Feb 9 12:16:40 2011 -0500

    - linux-2.6-acpi-fix-alias.patch: Fix ACPI object aliasing (#608648)

 kernel.spec                    |    7 ++++++-
 linux-2.6-acpi-fix-alias.patch |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index cd9ab8a..b2974a5 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -48,7 +48,7 @@ Summary: The Linux kernel
 # reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
 # scripts/rebase.sh should be made to do that for you, actually.
 #
-%global baserelease 83
+%global baserelease 84
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -652,6 +652,7 @@ Patch391: linux-2.6-acpi-video-dos.patch
 Patch393: acpi-ec-add-delay-before-write.patch
 Patch394: linux-2.6-acpi-debug-infinite-loop.patch
 Patch395: acpi-update-battery-information-on-notification-0x81.patch
+Patch396: linux-2.6-acpi-fix-alias.patch
 
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch452: linux-2.6.30-no-pcspkr-modalias.patch
@@ -1323,6 +1324,7 @@ ApplyPatch acpi-ec-add-delay-before-write.patch
 ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch
 ApplyPatch acpi-update-battery-information-on-notification-0x81.patch
 ApplyPatch linux-2.6-defaults-no-pm-async.patch
+ApplyPatch linux-2.6-acpi-fix-alias.patch
 
 # Various low-impact patches to aid debugging.
 ApplyPatch linux-2.6-debug-sizeof-structs.patch
@@ -2145,6 +2147,9 @@ fi
 # and build.
 
 %changelog
+* Wed Feb 11 2011 Matthew Garrett <mjg at redhat.com> 2.6.35.11-84
+- linux-2.6-acpi-fix-alias.patch: Fix ACPI object aliasing (#608648)
+
 * Sun Feb 06 2011 Chuck Ebbert <cebbert at redhat.com>  2.6.35.11-83
 - Linux 2.6.35.11
 
diff --git a/linux-2.6-acpi-fix-alias.patch b/linux-2.6-acpi-fix-alias.patch
new file mode 100644
index 0000000..bd29568
--- /dev/null
+++ b/linux-2.6-acpi-fix-alias.patch
@@ -0,0 +1,33 @@
+diff -up linux-2.6.34.x86_64/drivers/acpi/acpica/dsobject.c.mjg59 linux-2.6.34.x86_64/drivers/acpi/acpica/dsobject.c
+--- linux-2.6.34.x86_64/drivers/acpi/acpica/dsobject.c.mjg59	2010-05-16 17:17:36.000000000 -0400
++++ linux-2.6.34.x86_64/drivers/acpi/acpica/dsobject.c	2011-02-09 12:08:58.430275518 -0500
+@@ -81,6 +81,7 @@ acpi_ds_build_internal_object(struct acp
+ {
+ 	union acpi_operand_object *obj_desc;
+ 	acpi_status status;
++	acpi_object_type type;
+ 
+ 	ACPI_FUNCTION_TRACE(ds_build_internal_object);
+ 
+@@ -172,7 +173,20 @@ acpi_ds_build_internal_object(struct acp
+ 				return_ACPI_STATUS(status);
+ 			}
+ 
+-			switch (op->common.node->type) {
++			/*
++			 * Special handling for Alias objects. We need to setup the type
++			 * and the Op->Common.Node to point to the Alias target. Note,
++			 * Alias has at most one level of indirection internally.
++			 */
++			type = op->common.node->type;
++			if (type == ACPI_TYPE_LOCAL_ALIAS) {
++				type = obj_desc->common.type;
++				op->common.node =
++				    ACPI_CAST_PTR(struct acpi_namespace_node,
++						  op->common.node->object);
++			}
++
++			switch (type) {
+ 				/*
+ 				 * For these types, we need the actual node, not the subobject.
+ 				 * However, the subobject did not get an extra reference count above.


More information about the scm-commits mailing list