Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp627014pxx; Mon, 26 Oct 2020 17:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxnoLQvds0Pjx6D4MCIWNbpDdBhRJd2dGkNjPQa2UKms1XduPoQKMdOqwwydEn6Cf+Lu7P X-Received: by 2002:a17:906:249a:: with SMTP id e26mr18161860ejb.484.1603758094894; Mon, 26 Oct 2020 17:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603758094; cv=none; d=google.com; s=arc-20160816; b=HfBX3CQykAqD8wyKpWqS7/WxuzLhKurqisU/MuUO3QbQkFt6mHoF+vstff7wh4dQuc bISSEQGhOiuObfG3a/zJevCba4sp7EttPUdLXEOC7mvzy7Uv1sRrlfc0uLBDMDwe/x/b QwtUue94GCYqcjniHu4BYrn7xd0XaNs2sZOfyodE1C5oz03tlpF/xegedAx070o5ZILO O2IhmcuiyWFfX44V4NEqCFCIJZKbQ31jPLEwetTTgTvLi87OzVdBMSADKfLydl0D6+De qUja0QK20Hnzn/WwgXPAgzAwkPnDjv9Afns9L1AcYu5vf4DXsPAa56n0r2u7T+OH9TWc 2y3A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YmC4TNTWcIG6bQURGz6GcVrsbojXmEygS71ES7w6CmE=; b=OGPZ1EBNEjlit0c+3dQiu9mfRsh93dlCs2qaaqQph5IwckjJXY4EN5m2QP8jcqKwBV HyI8e9GgPzQ/esXgTZIsAQAWc3pOtsl5NOm2FBp/H6KBVcnbtRQaHlC1apROteCSaam4 cIYcfvgfoMDLtAuzO1AMrKBHqdbSpcqXLMAQ3n94u7bmtoIdIk+GbinAxX5239vLa2K9 9JUSsWg3GrMzxAFjYa77FtxekDcFGwQGAEBb2ah3rYnhTdOHGZJ56ZDvSPCi4S6mi1mW GIQ5GYkI1eF5Mj6iN4VxPV6cRXYj0eQCB9v0k76en4hgUDk3fEj1HHG83HW8qA6K8i5x D84A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wBAfVOAQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si8043202ejg.242.2020.10.26.17.21.12; Mon, 26 Oct 2020 17:21:34 -0700 (PDT) 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=wBAfVOAQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437383AbgJ0AB5 (ORCPT + 99 others); Mon, 26 Oct 2020 20:01:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:35926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411103AbgJZX4T (ORCPT ); Mon, 26 Oct 2020 19:56:19 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FF72221FA; Mon, 26 Oct 2020 23:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756579; bh=6XoUXnIdvL4XZT7z50zvJBq5nImrK/02lhXRe6OvHEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wBAfVOAQI7g6vdNKDskrBg1iRLuZ2y6pjQdwgrQ2UvOPqOwXITnxBSkT1ghrjoW8l o3YhCyzUBlSae0vO2raLaN7iEpKAhdeu8srOxJDOa3lldKGVGRNG2lQNX1647X6KTf rKb8FBK6f+MXak4EHDCJB58fRzgj8HqVdhfP8z6E= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jonathan Cameron , "Rafael J . Wysocki" , Sasha Levin , linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 52/80] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Mon, 26 Oct 2020 19:54:48 -0400 Message-Id: <20201026235516.1025100-52-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026235516.1025100-1-sashal@kernel.org> References: <20201026235516.1025100-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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.25.1