From patchwork Mon Jul 13 15:55:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 235477 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2960645ilg; Mon, 13 Jul 2020 08:59:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEhtQiPJMpwJ0a4f+O+MWykI6JJQNJYfufw5w+tdqWns9uvVleYuip0x79aUH7KDUWz6Df X-Received: by 2002:a50:ee8d:: with SMTP id f13mr85085edr.302.1594655975847; Mon, 13 Jul 2020 08:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594655975; cv=none; d=google.com; s=arc-20160816; b=xfXvLRlk+LwypNzCc10AxM2jZ3FCT9T/LD0VcdAiWa0WfX1itk/IXcLZulh2Y40TtD ssok+4ORqBcmJKpWiepi/RVYeFrINnx/vBJRBccfKhEXi/J6NLYeVgaxXUXLJrLNShMR oqUxMkjWKQTlp2qXtInpAaYp3+zReP4auGAwQMRjtEOAaeDg7d0qQ+EhRJJb9x0RDy0S Duikh68Y8nDX0qqg4yHy8XbV/7JtQrLYZ6Q2CcE9cbwZN3aE35bmNoNKDyim4LoAVCv8 Lznke8EmALoqaUdzIXXgfHd+SVbpOuEEwAgT23WT7raXF7wyjLUajFMCuAyaIq9lXQ/0 Nu/w== 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=s3VJL9C0DXeAFRytWlVzbuKQUtwI9vMSlHZj/z80aR4=; b=ZtwvM2KdaCqWE8EFhJYua7JzGko7GVtV2yh9DqEKMr7bp6Z7Y+ZdsZbUy+zwUt6vt2 +k7Fbyk0S4nT76QDzNDwAZ+12e9Y9VuO7HI1E009HsGh/3Xn4SvbNAibs8wTwisbgvQk hvdsdRVrB7B2KwKqeiZDdrfZ2ca4Lx4iNceG81WexN4OBqbSnhG+tZjwh4DN8M8ynu7A eEql+qFixnM3Y3QXawC8D4YuXvaEVSs0gekg+dH2VARylfCqq4s/njDLlXXqHo2oeVjh P0M9AQnOqidnQgRh2EPal9ah9jr1kJGjUKf415ZmwE7Rn0xPNCITrQaRdrPj7oIRHnSr iSyQ== 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 i8si9335981edv.172.2020.07.13.08.59.35; Mon, 13 Jul 2020 08:59:35 -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 S1730252AbgGMP7f (ORCPT + 7 others); Mon, 13 Jul 2020 11:59:35 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2467 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730221AbgGMP7e (ORCPT ); Mon, 13 Jul 2020 11:59:34 -0400 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id ABC87638E661CC79765E; Mon, 13 Jul 2020 16:59:33 +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_GCM_SHA256) id 15.1.1913.5; Mon, 13 Jul 2020 16:59:33 +0100 From: Jonathan Cameron To: , , , CC: Lorenzo Pieralisi , Bjorn Helgaas , , , Ingo Molnar , Thomas Gleixner , , Dan Williams , Brice Goglin , Jonathan Cameron Subject: [PATCH v7 4/6] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Mon, 13 Jul 2020 23:55:58 +0800 Message-ID: <20200713155600.2272743-5-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200713155600.2272743-1-Jonathan.Cameron@huawei.com> References: <20200713155600.2272743-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-ClientProxiedBy: lhreml745-chm.china.huawei.com (10.201.108.195) 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 3c0414816772..7ad2d5882a7d 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");