From patchwork Tue Aug 18 17:04:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 247906 Delivered-To: patch@linaro.org Received: by 2002:a54:3b12:0:0:0:0:0 with SMTP id j18csp3285367ect; Tue, 18 Aug 2020 10:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytoQyNpZXgwsEk7bzsxvoa56MW1KPAOXp2VnLHqzz17yJR7Q/A4GB7oDmcQ1T+WstO0NW+ X-Received: by 2002:aa7:cdd0:: with SMTP id h16mr20877348edw.116.1597770408222; Tue, 18 Aug 2020 10:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597770408; cv=none; d=google.com; s=arc-20160816; b=WgMQS0yoGjkSUvNzv9us1I9Iav98EYN5coV8k+Ma6w/HTrwK25gya2031F/u0SjVut XCQhwj4aGVUL5gFanoRPDERiMJk6/qhbkoPVo3eASUJhFoT6CTqw55KbAG/JVHb+Gzor BAPZUd27TS68NHCfysgq/Arv2qysAvBibh1qRq7may5L86BTXJtzAEvh0oksXublVyiC 9JKlXoY8H3Ykbn98cQFWezCDt7YMMjdn/IKOaq5ysnNpZ69FySaPr0lLB0nycpa0IZp6 TWYb02HXt6ta8WHuhek+F7KKLUeJniy5MljuXq/uZU6S/9Doi4sfqLa5zO815uklXb/Y Xd0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mbxLlEWIUQzEcWeGGGAuTvzr4aHzAeYjxzFInWevZGM=; b=SnsPxuE6tty0JMBKsxc58i9k3om01tIT/YedS2gJqwDejIfmIuC6uebysLppA8KUHD aCQz8TYhR+3PfYHYDiMSanDafUzufHNmCR45BBH4oHoAyH7TmNHmn4M0q3qr0fTJrwMc Bw2Iv95aN+kg1+P554lNvlh5yVHBc8PWT2Dayolez0QbGSCIdYZJp7GHa6us8NNml9BS ACtTgVE52oS3aKrlgei5lQMK09gMC2N34oA3Z159Rq1CzGc2Y/TFq7LGLeLPM0FRIlR3 xIPfAR99UvDBy6n5Izrf/FwGC4DIqGRdmADlVXz+3k8/1dBEhjlK0d0vJSIOzWWa7TbA mqMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm19si14913477ejb.501.2020.08.18.10.06.48; Tue, 18 Aug 2020 10:06:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgHRRGj (ORCPT + 7 others); Tue, 18 Aug 2020 13:06:39 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728532AbgHRRGj (ORCPT ); Tue, 18 Aug 2020 13:06:39 -0400 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id CFA31B454DC57785B1B3; Tue, 18 Aug 2020 18:06:37 +0100 (IST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Tue, 18 Aug 2020 18:06:37 +0100 From: Jonathan Cameron To: , , , CC: Lorenzo Pieralisi , Bjorn Helgaas , , , Ingo Molnar , Thomas Gleixner , , Dan Williams , Brice Goglin , Sean V Kelley , Jonathan Cameron Subject: [PATCH v8 4/6] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Wed, 19 Aug 2020 01:04:15 +0800 Message-ID: <20200818170417.1515975-5-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200818170417.1515975-1-Jonathan.Cameron@huawei.com> References: <20200818170417.1515975-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-ClientProxiedBy: lhreml702-chm.china.huawei.com (10.201.108.51) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org In ACPI 6.3, the Memory Proximity Domain Attributes Structure changed substantially. One of those changes was that the flag for "Memory Proximity Domain field is valid" was deprecated. This was because the field "Proximity Domain for the Memory" became a required field and hence having a validity flag makes no sense. So the correct logic is to always assume the field is there. Current code assumes it never is. Signed-off-by: Jonathan Cameron --- drivers/acpi/numa/hmat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 2c32cfb72370..07cfe50136e0 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -424,7 +424,7 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade pr_info("HMAT: Memory Flags:%04x Processor Domain:%u Memory Domain:%u\n", p->flags, p->processor_PD, p->memory_PD); - if (p->flags & ACPI_HMAT_MEMORY_PD_VALID && hmat_revision == 1) { + if ((p->flags & ACPI_HMAT_MEMORY_PD_VALID && hmat_revision == 1) || hmat_revision == 2) { target = find_mem_target(p->memory_PD); if (!target) { pr_debug("HMAT: Memory Domain missing from SRAT\n");