From: Ben Widawsky <ben.widawsky@intel.com>
To: linux-cxl@vger.kernel.org
Cc: patches@lists.linux.dev, Ben Widawsky <ben.widawsky@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
Vishal Verma <vishal.l.verma@intel.com>
Subject: [PATCH 4/4] cxl/acpi: Use common IW/IG decoding
Date: Thu, 27 Jan 2022 13:29:11 -0800 [thread overview]
Message-ID: <20220127212911.127741-5-ben.widawsky@intel.com> (raw)
In-Reply-To: <20220127212911.127741-1-ben.widawsky@intel.com>
Now that functionality to decode interleave ways and granularity is in
a common place, use that functionality in the cxl_acpi driver.
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
drivers/cxl/acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index f99cad8350fd..d6dcb2b6af48 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -10,8 +10,8 @@
#include "cxl.h"
/* Encode defined in CXL 2.0 8.2.5.12.7 HDM Decoder Control Register */
-#define CFMWS_INTERLEAVE_WAYS(x) (1 << (x)->interleave_ways)
-#define CFMWS_INTERLEAVE_GRANULARITY(x) (1 << ((x)->granularity + 8))
+#define CFMWS_INTERLEAVE_WAYS(x) (cxl_to_interleave_ways((x)->interleave_ways))
+#define CFMWS_INTERLEAVE_GRANULARITY(x) (cxl_to_interleave_granularity((x)->granularity))
static unsigned long cfmws_to_decoder_flags(int restrictions)
{
--
2.35.0
next prev parent reply other threads:[~2022-01-27 21:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 21:29 [PATCH 0/4] Unify meaning of interleave attributes Ben Widawsky
2022-01-27 21:29 ` [PATCH 1/4] cxl/acpi: Store interleave granularity absolutely Ben Widawsky
2022-01-27 22:46 ` Dan Williams
2022-01-27 21:29 ` [PATCH 2/4] cxl/core: Add more decoder attributes to sysfs Ben Widawsky
2022-01-27 22:45 ` Dan Williams
2022-01-27 21:29 ` [PATCH 3/4] cxl/core: Extract IW/IG decoding Ben Widawsky
2022-01-27 23:01 ` Dan Williams
2022-01-27 21:29 ` Ben Widawsky [this message]
2022-01-28 10:15 ` [PATCH 0/4] Unify meaning of interleave attributes Jonathan Cameron
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=20220127212911.127741-5-ben.widawsky@intel.com \
--to=ben.widawsky@intel.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=vishal.l.verma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.