Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3909148ybl; Mon, 9 Dec 2019 02:07:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyf22DoKzNhvV2i2Aw8iJIORbqBZ2ehkKGkjQ7w0S57FuZ3Umtzlc33v0drL/vIqR0GEC1X X-Received: by 2002:aca:f445:: with SMTP id s66mr22344856oih.95.1575886078314; Mon, 09 Dec 2019 02:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575886078; cv=none; d=google.com; s=arc-20160816; b=0JxOTT0uhkPcAwYeozOtXPErHXFDGoKsZbcmaPoa0WfE4vaP4RUbur7kA0/IdvjYmf B4VWiAqqpsEUiRGq5evAv+hgxlbVL9K/wBxhzHgIfo3WllJJ7lm4/2wrRB0y553CL7P6 z7bod779Q7Wa33v8OOivdbq9X4G2ulBdEjH84SIfVoMS5k6UOn44lRoMmlGsKDJnG2fO KeDeElU5k2/05vpKy78Ylfi5EzxonyYj/tXpaZfxMexbgJlos38JoH94QoPu8X7QXsPZ mpwexIiqWu3+VsyF9CUKBk0rKBfFh5PSRTuNa+t0kY5UbQdg1l5nS2zmcX1bcM4VXJzU 63UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+FtaHC/0W+/eC6v7DNQkqqYp4JgH05lJ8TyIqrizDhU=; b=DdvRPt6pge3zm7CYL6xT4G2iYmvL32kyPvp3kItk1JYDOGV0KEUjdjqqWnzmd+P3c1 wzVUrx9UhL17iAAPXzI7F5N+PfwoJDYuhaaTXm/PcIEZ+9BhsvrA+l2E/4tMrisRT9jx E/VkNOcmmxyQqynR2tWXIoVD7tQTRQQL26m4gbJzuDjmpneMa1XNjZdi1V5GQKpYBYmF gtCAr8DSbcxolC4P/jbRXRpdhtTMzxltV2YRuj0V1MCITw25LP4Re/dhIOi4nsXlTQSD 6j5GhxIXpELiTWzeuDNyDrvNJE0EnPlA061s2ase3NVn70IIz+iR3eUqG+wzkURepP+M E8Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si11575799oia.44.2019.12.09.02.07.23; Mon, 09 Dec 2019 02:07:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727247AbfLIKBy (ORCPT + 99 others); Mon, 9 Dec 2019 05:01:54 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38568 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfLIKBy (ORCPT ); Mon, 9 Dec 2019 05:01:54 -0500 Received: by mail-oi1-f196.google.com with SMTP id b8so5795351oiy.5; Mon, 09 Dec 2019 02:01:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+FtaHC/0W+/eC6v7DNQkqqYp4JgH05lJ8TyIqrizDhU=; b=NXhB4U1v2RcMbAr52Bglnu2G25EYrw/SUnwq0SjKtTGfl5r1fbl8H6mXKCSPHyM4ke rg9zfs+5WzN0t2e5g2YIKDQud8cCv8LrHvGyEIyMYDopW5j0V1x9oDkeqg6mD41EtQKJ /EUBPzNYeLxUfmKvqQsBFVhRkXn3GkvphX8FOSg0Wb59J+8fi4+Htv1qk0ct/WEdwNX1 F5a9W6igHgRm01O0psme+kv+0+Q+AXGqGv7N0UubqcjnvBFfH+W6GJZNgStxVem/Td3A DFXqJSMtYd7D4e2vX7qNmvAN7LdvwLXduV3W5v0Dt+lgeRdEPEWIuzcze+vHQ2WOVBYX yuAQ== X-Gm-Message-State: APjAAAXdtJTkRnW2CSV/z46k4JBqrSV+smQJUxp6AaGcDM/qGGuWLzbk cZovQuGcxpkVoCl5wk/Cl4Is2AJjwpWDXSUt8nY= X-Received: by 2002:a05:6808:b38:: with SMTP id t24mr18479690oij.110.1575885713344; Mon, 09 Dec 2019 02:01:53 -0800 (PST) MIME-Version: 1.0 References: <20191202070348.32148-1-tao3.xu@intel.com> In-Reply-To: <20191202070348.32148-1-tao3.xu@intel.com> From: "Rafael J. Wysocki" Date: Mon, 9 Dec 2019 11:01:42 +0100 Message-ID: Subject: Re: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy To: Tao Xu Cc: Rafael Wysocki , Len Brown , Keith Busch , Greg Kroah-Hartman , Dan Williams , Dave Hansen , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 2, 2019 at 8:03 AM Tao Xu wrote: > > In chapter 5.2.27.5, Table 5-147: Field "Cache Attributes" of > ACPI 6.3 spec: 0 is "None", 1 is "Direct Mapped", 2 is "Complex Cache > Indexing" for Cache Associativity; 0 is "None", 1 is "Write Back", > 2 is "Write Through" for Write Policy. Well, I'm not sure what the connection between the above statement, which is correct AFAICS, and the changes made by the patch is. Is that the *_OTHER symbol names are confusing or something deeper? > Signed-off-by: Tao Xu > --- > drivers/acpi/numa/hmat.c | 4 ++-- > include/linux/node.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c > index 2c32cfb72370..719d0279563d 100644 > --- a/drivers/acpi/numa/hmat.c > +++ b/drivers/acpi/numa/hmat.c > @@ -383,7 +383,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header, > break; > case ACPI_HMAT_CA_NONE: > default: > - tcache->cache_attrs.indexing = NODE_CACHE_OTHER; > + tcache->cache_attrs.indexing = NODE_CACHE_NONE; > break; > } > > @@ -396,7 +396,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header, > break; > case ACPI_HMAT_CP_NONE: > default: > - tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_OTHER; > + tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_NONE; > break; > } > list_add_tail(&tcache->node, &target->caches); > diff --git a/include/linux/node.h b/include/linux/node.h > index 4866f32a02d8..6dbd764d09ce 100644 > --- a/include/linux/node.h > +++ b/include/linux/node.h > @@ -36,15 +36,15 @@ struct node_hmem_attrs { > }; > > enum cache_indexing { > + NODE_CACHE_NONE, > NODE_CACHE_DIRECT_MAP, > NODE_CACHE_INDEXED, > - NODE_CACHE_OTHER, > }; > > enum cache_write_policy { > + NODE_CACHE_WRITE_NONE, > NODE_CACHE_WRITE_BACK, > NODE_CACHE_WRITE_THROUGH, > - NODE_CACHE_WRITE_OTHER, > }; > > /**