From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: <alison.schofield@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v5 1/5] cxl: Move hpa_to_spa callback to a new root decoder ops structure
Date: Tue, 12 Aug 2025 16:33:21 +0100 [thread overview]
Message-ID: <20250812163321.00006e20@huawei.com> (raw)
In-Reply-To: <818530c82c351a9c0d3a204f593068dd2126a5a9.1754290144.git.alison.schofield@intel.com>
On Mon, 4 Aug 2025 01:00:09 -0700
alison.schofield@intel.com wrote:
> From: Dave Jiang <dave.jiang@intel.com>
>
> The root decoder's HPA to SPA translation logic was implemented using
> a single function pointer. In preparation for additional per-decoder
> callbacks, convert this into a struct cxl_rd_ops and move the
> hpa_to_spa pointer into it.
>
> To avoid maintaining a static ops instance populated with mostly NULL
> pointers, allocate the ops structure dynamically only when a platform
> requires overrides (e.g. XOR interleave decoding).
>
> The setup can be extended as additional callbacks are added.
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Co-developed-by: Alison Schofield <alison.schofield@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
One trivial thing inline.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> ---
>
> Changes in v5: Remove stray blank line in cxl_root_decoder_alloc() (DaveJ)
>
>
> drivers/cxl/acpi.c | 10 +++++++---
> drivers/cxl/core/port.c | 1 +
> drivers/cxl/core/region.c | 11 ++++++++---
> drivers/cxl/cxl.h | 12 +++++++++---
> 4 files changed, 25 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 712624cba2b6..b8d69460a368 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -20,7 +20,6 @@ static const guid_t acpi_cxl_qtg_id_guid =
> GUID_INIT(0xF365F9A6, 0xA7DE, 0x4071,
> 0xA6, 0x6A, 0xB4, 0x0C, 0x0B, 0x4F, 0x8E, 0x52);
>
> -
Valid but unrelated change.
> static u64 cxl_xor_hpa_to_spa(struct cxl_root_decoder *cxlrd, u64 hpa)
next prev parent reply other threads:[~2025-08-12 15:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 8:00 [PATCH v5 0/5] cxl: Support Poison Inject & Clear by Region Offset alison.schofield
2025-08-04 8:00 ` [PATCH v5 1/5] cxl: Move hpa_to_spa callback to a new root decoder ops structure alison.schofield
2025-08-12 15:33 ` Jonathan Cameron [this message]
2025-08-04 8:00 ` [PATCH v5 2/5] cxl: Define a SPA->CXL HPA root decoder callback for XOR Math alison.schofield
2025-08-04 8:00 ` [PATCH v5 3/5] cxl/region: Introduce SPA to DPA address translation alison.schofield
2025-08-12 15:39 ` Jonathan Cameron
2025-08-04 8:00 ` [PATCH v5 4/5] cxl/core: Add locked variants of the poison inject and clear funcs alison.schofield
2025-08-04 8:00 ` [PATCH v5 5/5] cxl/region: Add inject and clear poison by region offset alison.schofield
2025-08-13 0:06 ` [PATCH v5 0/5] cxl: Support Poison Inject & Clear by Region Offset Dave Jiang
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=20250812163321.00006e20@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--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.