Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5105879ybl; Tue, 10 Dec 2019 00:07:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwRVCkRJh0vw2kH+Wej8hjpJbLy1I3dmQbAs0LaTdEiOmvFdn+f7cOSbHnY3QhTu+KNxmg6 X-Received: by 2002:aca:b445:: with SMTP id d66mr2986201oif.103.1575965246935; Tue, 10 Dec 2019 00:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575965246; cv=none; d=google.com; s=arc-20160816; b=JCmRyZ1ho+NjkOJ0Akk9ewHG501RIjc+pSfoTfYxO9Aizad029PpILx6L9vaJEGZP2 iGtUkzqMxJbfo1Oy/AdSkdwtGGotD9IhFvt7iVuh6udVc71evGBLB0kNOzr6UT4l7D3h uo9UkmBoKjAx5iL8/QrqFTOGZJ67jxyL5t1mNyHkOPZtDSZGOTCYJlUPuF16wgqBbx3p 7RpQwAQkfDkGkWkyC6U/o3FFjRcjfVTehq5ZNXKTipU/O97Rz3Vpwaw2egnZRZfsMud8 hmcNJoH8wAa3tJSZotudP7/WWxj3kL7GzZKoDKem/LhXwaZIgkWsQrowpComkgGS5g6Y FJgw== 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=Eh72hrhAfXUBpQjvGXyz9qtzGmK/pxlzuig7hgG6ycA=; b=rJ6vRsE9ewa9dTwm/4NHdul54gcGYfYbc5HDZtJCr3XuaoyFVuZaAdLRz+8hvnitC1 HDZPjUKufyOj4qdEUJfRsNWzqr9H6IjlcCgXLGxG8lcbaJVkHzaaYlvtRzzW3iScn3WB uoEXzKXmpH47hPK10Kt0ZgicHTvWjX+aUGZMKfER5wh1D9aOlOm/RW8jWJ8ciYaP04Rm VBlpQ63oO5Jz81GbcINeXAi/yLOvpiv8c9nwQSJaJt7ts43P6aZPi0EJtLVQxNBNhIGY HJlgVh3cQkLLW098QgqmJ01z/9nI1BO31jlQXP28rNXnD8wc3WViQ3LSN0Q5nf8EKWkz hzNg== 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 101si1421298otc.322.2019.12.10.00.07.14; Tue, 10 Dec 2019 00:07:26 -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 S1726957AbfLJIGk (ORCPT + 99 others); Tue, 10 Dec 2019 03:06:40 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:36806 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbfLJIGk (ORCPT ); Tue, 10 Dec 2019 03:06:40 -0500 Received: by mail-ot1-f66.google.com with SMTP id i4so14764485otr.3; Tue, 10 Dec 2019 00:06:39 -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=Eh72hrhAfXUBpQjvGXyz9qtzGmK/pxlzuig7hgG6ycA=; b=DaG0q4J6cZwUcx2kBHBVkShIyeuXB+eBN9fKAwVAxjvBeXLKNWpDaDPoqLQ7vyCQSi CqGD1uVOtSfeoqKj1iro7zE3HIefSjttKinaO5wAY793ketvW7/DHk5GsZN1UCRxJeea NdSs4lulzF2B/WVDYKylwjKf00xBIAH1eBpU7GqRfYWlqTuhct1lDj562uBRi6VvRqom 8HDhifTYcDCR7YglscuD63MAqVtckXngNp8/NX3KfbN54y1BuoqFoS96EuYjJBb34RW8 GdNvUuWJYGsUhtEDlgY/ZQiMb6HXqfzBgMlTLpJlqAxQG/HqCENkSFanX+4DOjZcdRlQ I7Nw== X-Gm-Message-State: APjAAAU0o0zR9MkQwHXFnZVsC462DB8k2FAQ6+Yj4FFSsk1AhRfY8p56 AyWCBuR6ot91za2AG9KM6V/pNDaKGNFCo0tWVWo= X-Received: by 2002:a05:6830:95:: with SMTP id a21mr23845111oto.167.1575965199471; Tue, 10 Dec 2019 00:06:39 -0800 (PST) MIME-Version: 1.0 References: <20191202070348.32148-1-tao3.xu@intel.com> <6dbcdaff-feae-68b9-006d-dd8aec032553@intel.com> In-Reply-To: <6dbcdaff-feae-68b9-006d-dd8aec032553@intel.com> From: "Rafael J. Wysocki" Date: Tue, 10 Dec 2019 09:06:27 +0100 Message-ID: Subject: Re: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy To: Tao Xu Cc: "Rafael J. Wysocki" , 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 Tue, Dec 10, 2019 at 2:04 AM Tao Xu wrote: > > On 12/9/2019 6:01 PM, Rafael J. Wysocki wrote: > > 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? > > > > Because in include/acpi/actbl1.h: > > #define ACPI_HMAT_CA_NONE (0) > > ACPI_HMAT_CA_NONE is 0, but in include/linux/node.h: > > enum cache_indexing { > NODE_CACHE_DIRECT_MAP, > NODE_CACHE_INDEXED, > NODE_CACHE_OTHER, > }; > NODE_CACHE_OTHER is 2, and for otner enum: > > case ACPI_HMAT_CA_DIRECT_MAPPED: > tcache->cache_attrs.indexing = NODE_CACHE_DIRECT_MAP; > break; > case ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING: > tcache->cache_attrs.indexing = NODE_CACHE_INDEXED; > break; > in include/acpi/actbl1.h: > > #define ACPI_HMAT_CA_DIRECT_MAPPED (1) > #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2) > > but in include/linux/node.h: > > NODE_CACHE_DIRECT_MAP is 0, NODE_CACHE_INDEXED is 1. This is incorrect. Why is it incorrect? > And same for enum cache_write_policy.