From patchwork Tue Nov 3 20:35:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 316874 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6385AC2D0A3 for ; Tue, 3 Nov 2020 21:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 241A32236F for ; Tue, 3 Nov 2020 21:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604439760; bh=Cf17dIEcpASZSYC8EarTV35qwYl4vDK2eaZMNRiIEFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fhRbaJFps4J+Z2mWNUYHQLt5pH6b6hB2ib3QKRfOPqUAve51vRPBdGx31nLMJiEI4 6ZBBYLv1jk1kpp18nyFxcoE5KcTMPRIAY6leLqRPdNV1dms+VQGUVRLmAa68QgYu03 idzFo6d6wsI1Bg36IioQHs0PKgXFLDHvJ4m2vIUY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731540AbgKCVmj (ORCPT ); Tue, 3 Nov 2020 16:42:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:55856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732300AbgKCUzY (ORCPT ); Tue, 3 Nov 2020 15:55:24 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15CC72053B; Tue, 3 Nov 2020 20:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436924; bh=Cf17dIEcpASZSYC8EarTV35qwYl4vDK2eaZMNRiIEFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OaKKLvMNOB+aCyBYw382td+WMRm2YEsKl1yDQeoSYvIftE/CGAyTvK/N2HmBWJPz5 g4NcjSNHPZ3lF+hignEfRe78S9sW5f6O/AQCr8ZStcDM9kn7C2GRB+6T/wfazaCvTV MbuBHIRXHjDRAVteOpbV38TDCpEvNgGMSBFirx6o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.4 069/214] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Tue, 3 Nov 2020 21:35:17 +0100 Message-Id: <20201103203256.864057935@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jonathan Cameron [ Upstream commit 2c5b9bde95c96942f2873cea6ef383c02800e4a8 ] 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 Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/hmat/hmat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c index 8b0de8a3c6470..0f1c939b7e901 100644 --- a/drivers/acpi/hmat/hmat.c +++ b/drivers/acpi/hmat/hmat.c @@ -403,7 +403,8 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade pr_info("HMAT: Memory Flags:%04x Processor Domain:%d Memory Domain:%d\n", p->flags, p->processor_PD, p->memory_PD); - if (p->flags & ACPI_HMAT_MEMORY_PD_VALID && hmat_revision == 1) { + if ((hmat_revision == 1 && p->flags & ACPI_HMAT_MEMORY_PD_VALID) || + hmat_revision > 1) { target = find_mem_target(p->memory_PD); if (!target) { pr_debug("HMAT: Memory Domain missing from SRAT\n");