From: Tao Xu <tao3.xu@intel.com>
To: rafael.j.wysocki@intel.com, lenb@kernel.org,
keith.busch@intel.com, gregkh@linuxfoundation.org,
dan.j.williams@intel.com, dave.hansen@linux.intel.com
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Tao Xu <tao3.xu@intel.com>
Subject: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy
Date: Mon, 2 Dec 2019 15:03:48 +0800 [thread overview]
Message-ID: <20191202070348.32148-1-tao3.xu@intel.com> (raw)
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.
Signed-off-by: Tao Xu <tao3.xu@intel.com>
---
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,
};
/**
--
2.20.1
next reply other threads:[~2019-12-02 7:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 7:03 Tao Xu [this message]
2019-12-09 7:43 ` [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy Tao Xu
2019-12-09 7:55 ` Greg KH
2019-12-09 8:38 ` Tao Xu
2019-12-09 10:01 ` Rafael J. Wysocki
2019-12-10 1:04 ` Tao Xu
2019-12-10 8:06 ` Rafael J. Wysocki
2019-12-10 8:19 ` Tao Xu
2019-12-10 8:27 ` Rafael J. Wysocki
2019-12-10 13:18 ` Tao Xu
2019-12-11 3:04 ` Tao Xu
2019-12-11 3:37 ` Dan Williams
2019-12-11 4:27 ` Tao Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191202070348.32148-1-tao3.xu@intel.com \
--to=tao3.xu@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=keith.busch@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).