Skip to content

Commit 4909e6d

Browse files
jlintonarmrafaeljw
authored andcommitted
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>
1 parent d276709 commit 4909e6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/acpi/pptt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
209209
struct acpi_pptt_processor *cpu_node;
210210
u32 proc_sz;
211211

212+
if (table_hdr->revision > 1)
213+
return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE);
214+
212215
table_end = (unsigned long)table_hdr + table_hdr->length;
213216
node_entry = ACPI_PTR_DIFF(node, table_hdr);
214217
entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,

0 commit comments

Comments
 (0)