Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1035125pxx; Tue, 27 Oct 2020 06:51:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCvIwmSsOVjpXpFnhOHbAuPC9odm8K6hf1WQPVbs0EN0mIKwKJuy0q45ZLcmhBrX32LE30 X-Received: by 2002:a05:6402:2292:: with SMTP id cw18mr2461399edb.112.1603806680122; Tue, 27 Oct 2020 06:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603806680; cv=none; d=google.com; s=arc-20160816; b=iuskWGu4eRATUKH5Oe/Nuz0rNGBer0rkXVULXy0ASFKovNxDkiXA6eUEYhi6D8iXj9 KL+QNfWTe8SV/wyBFP7IizySfFcqfjmx/bRtjioGn252Z5QXUHL6TuB1TckJpkqZyfIu NXdMhOurm3Gt2KNmtGDFjOtKQYdiWgxZ8hXvEEw8tIqKykUA7bMd74jpHSkaKaNNugkJ YSLFKnZGFCq7GUlCxsVY1CeNLVEr4mohQC7drcH5zPFPnWRElHZQywNrNPK5xrnBuWU8 7GK/r5sD1PgZKRhGcwcLq/UIQq7P5je86WezMKm9LCrVw9j8fXq5sre2s6Ivn1aeWBbQ 9u8Q== 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=L4JFyZF8ysJ9I4hDvbrrRtEEFxaI6Yv1IAB2fIdyaak=; b=f8Cf8gM44hiuoSjAwDVGscCKAyopD2XNtk3nvg42rOexJVDrmcUfVt1QzKPOiBpQ50 uXbVhpSoKkL74s58fK66Ra8ijZrXN8xAKxHY9oPZrJ3XXft4IeWzI6YjgyKSP2HE+CVR pLEtqqDmCM9GFzHzh6oOzdoAL9eshPo6WlgQL8h4K6e3KOyygfViudCvxJ4t10oLE/Wl vMpPCHs3DxnoDljjVP2y32KVN/+erpE8Gmd4G//qBvuonTV2Efr1a/LACys1p0RfNzAX 7I/AVbvlTDWxvqqnD2leRAuOdCE0LXZUq2t01CdIcKohoEeK8S/SuQLgVnWyHGgul7TG qjrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RjQkT5U9; 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 j20si890948edt.424.2020.10.27.06.50.56; Tue, 27 Oct 2020 06:51:20 -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=RjQkT5U9; 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 S2502062AbgJ0AjT (ORCPT + 99 others); Mon, 26 Oct 2020 20:39:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:51304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409304AbgJZXvF (ORCPT ); Mon, 26 Oct 2020 19:51:05 -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 9E3DD217A0; Mon, 26 Oct 2020 23:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756265; bh=HOQPy0p4Pi0/XvfEJsVuHquvnr0IOxQpH7ArqHJntZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RjQkT5U9mot99B7y81BEOAoLu81zyvqQPhSbjgbrW1h+YkzJSo6AO90VukivUJKXu F1KWDX+lOwqwQfBF9b6pCaLMo7aBq98uzC+ZN+wT6b5UlN0lOHKE3I5c1WJXhR+Dm0 +ku7NdBzMEEqr1enezAMh7953ivlmQ1WK0i30t6M= 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.9 098/147] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Mon, 26 Oct 2020 19:48:16 -0400 Message-Id: <20201026234905.1022767-98-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026234905.1022767-1-sashal@kernel.org> References: <20201026234905.1022767-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/numa/hmat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 2c32cfb723701..6a91a55229aee 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -424,7 +424,8 @@ 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 ((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