All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-cxl@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH 3/5] cxl/acpi: Minimize granularity for x1 interleaves
Date: Fri, 22 Jul 2022 17:56:09 -0700	[thread overview]
Message-ID: <165853776917.2430596.16823264262010844458.stgit@dwillia2-xfh.jf.intel.com> (raw)
In-Reply-To: <165853775181.2430596.3054032756974329979.stgit@dwillia2-xfh.jf.intel.com>

The kernel enforces that region granularity is >= to the top-level
interleave-granularity for the given CXL window. However, when the CXL
window interleave is x1, i.e. non-interleaved at the host bridge level,
then the specified granularity does not matter. Override the window
specified granularity to the CXL minimum so that any valid region
granularity is >= to the root granularity.

Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/cxl/acpi.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index eb436268b92c..67137e17b8c9 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -140,6 +140,12 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg,
 		.end = res->end,
 	};
 	cxld->interleave_ways = ways;
+	/*
+	 * Minimize the x1 granularity to advertise support for any
+	 * valid region granularity
+	 */
+	if (ways == 1)
+		ig = 256;
 	cxld->interleave_granularity = ig;
 
 	rc = cxl_decoder_add(cxld, target_map);


  parent reply	other threads:[~2022-07-23  0:58 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23  0:55 [PATCH 0/5] CXL Region Provisioning Fixes Dan Williams
2022-07-23  0:55 ` [PATCH 1/5] cxl/acpi: Autoload driver for 'cxl_acpi' test devices Dan Williams
2022-08-01 19:24   ` Verma, Vishal L
2022-07-23  0:56 ` [PATCH 2/5] cxl/region: Delete 'region' attribute from root decoders Dan Williams
2022-08-01 19:32   ` Alison Schofield
2022-08-01 19:38   ` Verma, Vishal L
2022-08-01 19:40     ` Verma, Vishal L
2022-08-01 21:32       ` Dan Williams
2022-08-01 21:32     ` Dan Williams
2022-07-23  0:56 ` Dan Williams [this message]
2022-08-01 19:35   ` [PATCH 3/5] cxl/acpi: Minimize granularity for x1 interleaves Alison Schofield
2022-08-01 19:45   ` Verma, Vishal L
2022-08-01 21:34     ` Dan Williams
2022-08-02 15:56   ` Jonathan Cameron
2022-08-02 16:52     ` Jonathan Cameron
2022-08-02 17:33     ` Dan Williams
2022-08-03 16:00       ` Jonathan Cameron
2022-08-03 17:18         ` Dan Williams
2022-08-04  9:32           ` Jonathan Cameron
2022-07-23  0:56 ` [PATCH 4/5] cxl/region: Stop initializing interleave granularity Dan Williams
2022-08-01 19:41   ` Alison Schofield
2022-08-01 19:47   ` Verma, Vishal L
2022-07-23  0:56 ` [PATCH 5/5] cxl/region: Constrain region granularity scaling factor Dan Williams
2022-08-01 19:43   ` Alison Schofield
2022-08-01 20:55   ` Verma, Vishal L
2022-08-03 16:17   ` Jonathan Cameron
2022-08-04 16:33     ` Dan Williams
2022-08-04 17:57       ` Dan Williams

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=165853776917.2430596.16823264262010844458.stgit@dwillia2-xfh.jf.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    /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.