Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp883345pxb; Tue, 3 Nov 2020 15:28:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeS0/DEgt/6DJC6OGOtGN0yqwP6ULC2Mc/jILQYdprvV7mYkpUiGRwPhnqyHEopN6FkWIW X-Received: by 2002:a50:cbc7:: with SMTP id l7mr23847078edi.148.1604446104413; Tue, 03 Nov 2020 15:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604446104; cv=none; d=google.com; s=arc-20160816; b=MWlADwxhZWBFVM+aXqX36VA4LfewcOarbwrW7WIZmWmsYzxM5Ts9ioSkuGkAvk+NgM Jcmyf8QfUIm4ysUQy0NOe2+dL9sbyhUK2YbmILt9MmmezVcXPvsSCFGRyaNCDbk72WP/ yHJf8oPMchzjeTzQt8dic23kATfQ+l3lT2kBiRDbnOyVv5D1rZ88UUwm2LAgHTMbuaM1 96uGXykNo+P8LCcdyCg5bIUF0Qx7hxH0NGVF8TZJhoaLm9sRJ/Mmb102901UJnjd8Qao tVxOWbjDIukJIU7vAtFQzGIuY7d7vkD1ANzmnNM83oNWYshTepJkPMq4owreQSMzl0wv +/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+WxsH/7v9J3r0Ru8zC0RcU2FG5Xdh6G5ZOAi/fjwcAQ=; b=cwtUlUZXXk5sT2KVBocoX3jCaspI0+chijhpLC3GUBEvTgUDSCj9MIzzbC3drOM5Qw K/d8urYVbcvkgrs3vg/KM0RLo0lxAQW0F0PTeOSl30/5SiuXuBU5Zr3FpU88qKmMw9GS rO5nlHYb57utqDg+V8Ygkm0H5sAoOx5+kE2w6LhdbB4KyAr7o5gmt58gsGFwD//RqKPS cH3u5HCm6nhyRfEftAzhMLj+eokJyLnTUptf4M0bYEY9W0rEyI2FYahvptijHW6CCh2D 16x0SqpucnZRBm1vahGFaBZ0w8ZLB9AQ+adD0BgubCuFwz9QMmcAi3VlbKD1SezAjyul yykw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OaKKLvMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si217010eji.711.2020.11.03.15.28.01; Tue, 03 Nov 2020 15:28:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OaKKLvMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732334AbgKCVmk (ORCPT + 99 others); Tue, 3 Nov 2020 16:42:40 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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"); -- 2.27.0