Linux CXL
 help / color / mirror / Atom feed
From: "Cheatham, Benjamin" <benjamin.cheatham@amd.com>
To: Dave Jiang <dave.jiang@intel.com>, <nvdimm@lists.linux.dev>,
	<alison.schofield@intel.com>
Cc: <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 2/7] libcxl: Add CXL protocol errors
Date: Mon, 12 Jan 2026 11:20:05 -0600	[thread overview]
Message-ID: <411cfbfd-c82d-480f-b2b1-1c4cc5b7b4ed@amd.com> (raw)
In-Reply-To: <c6f4f05b-b1b8-4b2b-b9d8-27be52b3e549@intel.com>

Hey Dave, thanks for taking a look! Responses inline.

On 1/9/2026 11:54 AM, Dave Jiang wrote:
> 
> 
> On 1/9/26 9:07 AM, Ben Cheatham wrote:
>> The v6.11 Linux kernel adds CXL protocl (CXL.cache & CXL.mem) error
>> injection for platforms that implement the error types as according to
>> the v6.5+ ACPI specification. The interface for injecting these errors
>> are provided by the kernel under the CXL debugfs. The relevant files in
>> the interface are the einj_types file, which provides the available CXL
>> error types for injection, and the einj_inject file, which injects the
>> error into a CXL VH root port or CXL RCH downstream port.
>>
>> Add a library API to retrieve the CXL error types and inject them. This
>> API will be used in a later commit by the 'cxl-inject-error' and
>> 'cxl-list' commands.
>>
>> Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
> 
> Just a nit below. otherwise
> 
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>

[snip]

>> +static void cxl_add_protocol_errors(struct cxl_ctx *ctx)
>> +{
>> +	struct cxl_protocol_error *perror;
>> +	char buf[SYSFS_ATTR_SIZE];
>> +	char *path, *num, *save;
>> +	size_t path_len, len;
>> +	unsigned long n;
>> +	int rc = 0;
>> +
>> +	if (!ctx->cxl_debugfs)
>> +		return;
>> +
>> +	path_len = strlen(ctx->cxl_debugfs) + 100;
>> +	path = calloc(1, path_len);
> 
> Maybe just use PATH_MAX from <linux/limits.h>.

Sounds good to me, I'll change it.

  reply	other threads:[~2026-01-12 17:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 16:07 [ndctl PATCH v6 0/7] Add error injection support Ben Cheatham
2026-01-09 16:07 ` [PATCH 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
2026-01-09 17:43   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 2/7] libcxl: Add CXL protocol errors Ben Cheatham
2026-01-09 17:54   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin [this message]
2026-01-09 16:07 ` [PATCH 3/7] libcxl: Add poison injection support Ben Cheatham
2026-01-09 18:03   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin
2026-01-09 16:07 ` [PATCH 4/7] cxl: Add inject-error command Ben Cheatham
2026-01-09 21:53   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin
2026-01-09 16:07 ` [PATCH 5/7] cxl: Add clear-error command Ben Cheatham
2026-01-09 22:12   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 6/7] cxl/list: Add injectable errors in output Ben Cheatham
2026-01-09 22:17   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 7/7] Documentation: Add docs for inject/clear-error commands Ben Cheatham
2026-01-09 22:25   ` Dave Jiang
  -- strict thread matches above, loose matches on Subject: below --
2026-01-22 20:37 [ndctl PATCH v7 0/7] Add error injection support Ben Cheatham
2026-01-22 20:37 ` [PATCH 2/7] libcxl: Add CXL protocol errors Ben Cheatham

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=411cfbfd-c82d-480f-b2b1-1c4cc5b7b4ed@amd.com \
    --to=benjamin.cheatham@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    /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