From: Jeremy Linton Date: Fri, 1 Mar 2019 18:52:21 +0000 (-0600) Subject: ACPI: tables: Simplify PPTT leaf node detection X-Git-Tag: v5.4-rc1~1393^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4909e6df213a7c3e5e282538356f31ab68828793;p=platform%2Fkernel%2Flinux-rpi.git ACPI: tables: Simplify PPTT leaf node detection ACPI 6.3 bumps the PPTT table revision and adds a LEAF_NODE flag. This allows us to avoid a second pass through the table to assure that the node in question is a leaf. Signed-off-by: Jeremy Linton Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index ad31c50..065c4fc 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c @@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, struct acpi_pptt_processor *cpu_node; u32 proc_sz; + if (table_hdr->revision > 1) + return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE); + table_end = (unsigned long)table_hdr + table_hdr->length; node_entry = ACPI_PTR_DIFF(node, table_hdr); entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,