ACPI/PPTT: Modify node flag detection to find last IDENTICAL
authorJeremy Linton <jeremy.linton@arm.com>
Wed, 26 Jun 2019 21:37:15 +0000 (16:37 -0500)
committerWill Deacon <will@kernel.org>
Thu, 27 Jun 2019 15:52:13 +0000 (16:52 +0100)
commited2b664fcc8073c09394393756df3fc86977bbac
tree89872e71ab6996f9938599031b475924361b7eeb
parentae9924667a7ee91d49c91ebbc076451ca6b6293a
ACPI/PPTT: Modify node flag detection to find last IDENTICAL

The ACPI specification implies that the IDENTICAL flag should be
set on all non leaf nodes where the children are identical.
This means that we need to be searching for the last node with
the identical flag set rather than the first one.

Since this flag is also dependent on the table revision, we
need to add a bit of extra code to verify the table revision,
and the next node's state in the traversal. Since we want to
avoid function pointers here, lets just special case
the IDENTICAL flag.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/acpi/pptt.c