From patchwork Fri Mar 1 18:52:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 159505 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp1071815jad; Fri, 1 Mar 2019 10:52:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzfNfRHhWd1naJQj+Qkh782x0OfoLfAxc1urrqfiARcHvVSgVwtqgnJ5Va34dGfQFyDde0D X-Received: by 2002:a62:e704:: with SMTP id s4mr7010845pfh.94.1551466351808; Fri, 01 Mar 2019 10:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551466351; cv=none; d=google.com; s=arc-20160816; b=z27WK3MFNV+XTj3p/Yw0RYNkZBuUlrdMDleiG7iKCqmjpcCCO204LLBPvt1leSg1Tt BTXotxkD9sOA9rrUE/5WhhvrcOlUuNWU/r9wmy1z4m7dQTw2OmHFKIBMEgw//kl48RrY X+UzxegmVaRHB6cxkSYrulnIAQpa2knHpfh7cd+Cm44TuoVZrFAQxPCrfurdEZmniUGp YBbh+WhpgWztt/kvW7C7wpoAGR5+24A7bBqsKpL0MaHejgQv4JFTAy+/zSzUPHpyL0eY XBYbAuD7L5YCevjFBJObWe13rfERcSbX7kLa66cudW34vN9E7ZBKxw/r2sObtBRNcIlr v+kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=RkwjamGC85YKQCG3wlDG+nZgILmlbPf7MSccrnZnogo=; b=WZ15rDykJIp33gAR3diLcPAyRZ/55/mEA6LB6q1OWPYtaJrWy/8f16u0/+zoVxGuyu 9E9GGGpz1WQ7n7/YythwNRFJKbCqpNmPi4TRP9WIZD+KOJieawxlgxJXjLdxRn0HpEek xpyMThk9FqLvnheVk7EcTzglO3igX+l4kJF1pEsyxO/W4cOt+ZkYdyPhCI8te959VnXE rQz76tHwwNQ2BygHbQ6wFl8PslLb+MTu7m9u4jFgr6vOWCTkzmoEslSnUKSWNnrFmDeE 3QPtCMLKtM/T2+uN6wir/3T5WLktA0m0iMmQH7hfOU69HcwXVltSnIHW5mqa8kLk9cfG 2YpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l186si19840455pgd.67.2019.03.01.10.52.31; Fri, 01 Mar 2019 10:52:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728276AbfCASwa (ORCPT + 9 others); Fri, 1 Mar 2019 13:52:30 -0500 Received: from foss.arm.com ([217.140.101.70]:40508 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726195AbfCASwa (ORCPT ); Fri, 1 Mar 2019 13:52:30 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16EA280D; Fri, 1 Mar 2019 10:52:30 -0800 (PST) Received: from beelzebub.austin.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9B2A63F575; Fri, 1 Mar 2019 10:52:29 -0800 (PST) From: Jeremy Linton To: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, sudeep.holla@arm.com, Lorenzo.Pieralisi@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jeremy Linton Subject: [PATCH] ACPI/PPTT: Simplify leaf node detection. Date: Fri, 1 Mar 2019 12:52:21 -0600 Message-Id: <20190301185221.608501-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.17.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- drivers/acpi/pptt.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 Reviewed-by:Sudeep Holla 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, 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,