mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Cheatham, Benjamin" <benjamin.cheatham@amd.com>
To: Dave Jiang <dave.jiang@intel.com>,
	Yongxin Yang <yangyongxin@kylinos.cn>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v4] cxl/core: Create einj_types when EINJ becomes available
Date: Fri, 30 Oct 2026 15:36:43 -0500	[thread overview]
Message-ID: <211fd9a8-3aaf-4952-a38f-69e5842008d7@amd.com> (raw)
In-Reply-To: <7ef537e0-536e-4e32-8366-df3cee7fc9fc@amd.com>

On 10/30/2026 2:24 PM, Cheatham, Benjamin wrote:
> 
>>> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
>>> index cab8ce39f465..b9245261ee39 100644
>>> --- a/drivers/cxl/cxl.h
>>> +++ b/drivers/cxl/cxl.h
>>> @@ -926,4 +926,6 @@ struct cxl_dport *devm_cxl_add_dport_by_dev(struct cxl_port *port,
>>>  
>>>  u16 cxl_gpf_get_dvsec(struct device *dev);
>>>  
>>> +void cxl_debugfs_einj_add_types(void);
>>> +
>>>  #endif /* __CXL_H__ */
>>
>> Maybe drop the cxl_acpi_probe() hook? Host bridge dports, RCH included, already go through __devm_cxl_add_dport() -> cxl_debugfs_create_dport_dir() -> cxl_debugfs_einj_add_types() inside the same probe, so the hook runs at the same time and adds nothing. That also removes the export.
>>
>> Also, the RCH all built-in case still never gets einj_types since the only RCH dport is added at subsys_initcall_sync. Should the commit log say so?
>>
>> I do wonder if it's simpler to always create einj_types in cxl_core_init() and have einj_cxl_available_error_type_show() return -ENODEV when EINJ isn't initialized. That covers every config without the lock and the extra hooks. Any thoughts Ben?
> 
> Yeah, that sounds good to me. Wish I had thought of it :)

I thought about it a bit more and there should also be a check for CONFIG_ACPI_APEI_EINJ_CXL as well. It doesn't make sense to
add the file if the support won't ever be turned on. So change the check for creating the file from "if (einj_cxl_is_initialized())"
to "if (IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL))".

Thanks,
Ben

  reply	other threads:[~2026-10-30 20:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  5:54 [PATCH] " Yongxin Yang
2026-10-28  8:49 ` [PATCH v2] " Yongxin Yang
2026-10-28 20:46   ` Cheatham, Benjamin
2026-10-29  6:56   ` [PATCH v3] " Yongxin Yang
2026-10-29 17:06     ` Cheatham, Benjamin
2026-10-30  3:20     ` [PATCH v4] " Yongxin Yang
2026-10-30 18:33       ` Dave Jiang
2026-10-30 19:24         ` Cheatham, Benjamin
2026-10-30 20:36           ` Cheatham, Benjamin [this message]
2026-10-30 18:39       ` 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=211fd9a8-3aaf-4952-a38f-69e5842008d7@amd.com \
    --to=benjamin.cheatham@amd.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=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    --cc=yangyongxin@kylinos.cn \
    /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

all inboxes | Powered by JetHome®