diff options
| author | Jeremy Linton <jeremy.linton@arm.com> | 2019-03-01 13:52:21 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-11 07:14:57 -0400 |
| commit | 4909e6df213a7c3e5e282538356f31ab68828793 (patch) | |
| tree | 405cd897a0d69083e6ca87b9a968238354602b9b | |
| parent | d276709ce6c90b9eceecdbd01a0c083ab04d3a52 (diff) | |
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 <jeremy.linton@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/acpi/pptt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index ad31c50de3be..065c4fc245d1 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, | |||
| 209 | struct acpi_pptt_processor *cpu_node; | 209 | struct acpi_pptt_processor *cpu_node; |
| 210 | u32 proc_sz; | 210 | u32 proc_sz; |
| 211 | 211 | ||
| 212 | if (table_hdr->revision > 1) | ||
| 213 | return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE); | ||
| 214 | |||
| 212 | table_end = (unsigned long)table_hdr + table_hdr->length; | 215 | table_end = (unsigned long)table_hdr + table_hdr->length; |
| 213 | node_entry = ACPI_PTR_DIFF(node, table_hdr); | 216 | node_entry = ACPI_PTR_DIFF(node, table_hdr); |
| 214 | entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, | 217 | entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, |
