Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252364 > unrolled thread

[PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes

Started by"Rafael J. Wysocki" <rjw@rjwysocki.net>
First post2015-10-21 01:30 +0200
Last post2015-10-22 01:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-21 01:30 +0200
    Re: [PATCH] ACPI / property: Fix subnode lookup scope for data-only  subnodes Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-10-21 15:30 +0200
      Re: [PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-22 01:20 +0200

#1252364 — [PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-10-21 01:30 +0200
Subject[PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes
Message-ID<qlOvU-1Pi-9@gated-at.bofh.it>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The correct scope for looking up the objects to generate data packages for
data-only subnodes pointed to by another data-only subnode is the scope
of the parent of that subnode and not the scope containing the _DSD object
at the top of the hierarchy (the latter works only if all of the objects
returning data-only subnode packages in a given hierarchy are in the same
scope).

Fix the code to work as expected.

Fixes: 445b0eb058f5 (ACPI / property: Add support for data-only subnodes)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

On top of linux-next.

Thanks,
Rafael

---
 drivers/acpi/property.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Index: linux-pm/drivers/acpi/property.c
===================================================================
--- linux-pm.orig/drivers/acpi/property.c
+++ linux-pm/drivers/acpi/property.c
@@ -71,7 +71,14 @@ static bool acpi_nondev_subnode_ok(acpi_
 	if (acpi_extract_properties(buf.pointer, &dn->data))
 		dn->handle = handle;
 
-	if (acpi_enumerate_nondev_subnodes(scope, buf.pointer, &dn->data))
+	/*
+	 * The scope for the subnode object lookup is the one of the namespace
+	 * node (device) containing the object that has returned the package.
+	 * That is, it's the scope of that object's parent.
+	 */
+	status = acpi_get_parent(handle, &scope);
+	if (ACPI_SUCCESS(status)
+	    && acpi_enumerate_nondev_subnodes(scope, buf.pointer, &dn->data))
 		dn->handle = handle;
 
 	if (dn->handle) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1252806 — Re: [PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2015-10-21 15:30 +0200
SubjectRe: [PATCH] ACPI / property: Fix subnode lookup scope for data-only subnodes
Message-ID<qm1CO-4fn-9@gated-at.bofh.it>
In reply to#1252364
On Wed, Oct 21, 2015 at 01:51:24AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> The correct scope for looking up the objects to generate data packages for
> data-only subnodes pointed to by another data-only subnode is the scope
> of the parent of that subnode and not the scope containing the _DSD object
> at the top of the hierarchy (the latter works only if all of the objects
> returning data-only subnode packages in a given hierarchy are in the same
> scope).
> 
> Fix the code to work as expected.
> 
> Fixes: 445b0eb058f5 (ACPI / property: Add support for data-only subnodes)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

All my tests still pass so you can also add

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1253340

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-10-22 01:20 +0200
Message-ID<qmaPM-R6-5@gated-at.bofh.it>
In reply to#1252806
On Wednesday, October 21, 2015 04:20:36 PM Mika Westerberg wrote:
> On Wed, Oct 21, 2015 at 01:51:24AM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > The correct scope for looking up the objects to generate data packages for
> > data-only subnodes pointed to by another data-only subnode is the scope
> > of the parent of that subnode and not the scope containing the _DSD object
> > at the top of the hierarchy (the latter works only if all of the objects
> > returning data-only subnode packages in a given hierarchy are in the same
> > scope).
> > 
> > Fix the code to work as expected.
> > 
> > Fixes: 445b0eb058f5 (ACPI / property: Add support for data-only subnodes)
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> 
> All my tests still pass so you can also add
> 
> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web