From: Dave Jiang <dave.jiang@intel.com>
To: dan.j.williams@intel.com, linux-cxl@vger.kernel.org
Cc: dave@stgolabs.net, jonathan.cameron@huawei.com,
alison.schofield@intel.com, vishal.l.verma@intel.com,
ira.weiny@intel.com, Li Ming <ming.li@zohomail.com>
Subject: Re: [PATCH v7 09/10] cxl: Move enumeration of hostbridge ports to the memdev probe path
Date: Tue, 22 Jul 2025 12:07:24 -0700 [thread overview]
Message-ID: <893e2652-ce0a-4bfe-b601-ab651dcda2ef@intel.com> (raw)
In-Reply-To: <687fd8e884ccb_137e6b10065@dwillia2-xfh.jf.intel.com.notmuch>
On 7/22/25 11:31 AM, dan.j.williams@intel.com wrote:
> Dave Jiang wrote:
>> Current enuemration scheme in cxl_acpi module creates the ports under the
>> root port by enumerating the hostbridges after the dports under the root
>> port is created. However error messages "cxl portN: Couldn't locate the
>> CXL.cache and CXL.mem capability array header" is observed when certain
>> platform has PCIe hotplug option turned on in BIOS. If the cxl_acpi module
>> probe is running before the CXL link between the endpoint device and the
>> RP is established, then the platform may not have exposed DVSEC ID 3 and/or
>> DVSEC ID 7 blocks which will trigger the error message. This behavior
>> is defined by the spec and not a hardware quirk.
>>
>> Setup an association in cxl_port to tie the host bridge device to the
>> associated cxl_root. The cxl_root provides a callback that's setup
>> by the cxl_acpi probe function in order to create a port per host bridge
>> that was previously done during cxl_acpi probe. Add the calling of the
>> callback in devm_cxl_enumerate_ports(). The observed behavior is that
>> ports that are not connected to endpoint device(s) are no longer
>> enumerated. This should also remove any excessive noise of port probe
>> failing on those inactive ports.
>
> I do not understand the story here. Why is it necessary to hide host
> bridge ports that do not have endpoints attached? I think that is
> valuable information for hotplug to identify available ports.
It's not going out of the way to hide on purpose. It's more that this is the resulting behavior when we are setting up the hierarchy via the mem probe.
>
> Now, if the concern is that host bridge CXL component register
> enumeration happens too early then the solution there is delay port
> register setup until the first dport arrival.
Are you saying to just delay the RP register setup until when dports show up, leave the enumeration as is?
>
> Otherwise this feels like too large of a change for just that small
> ordering constraint and I think this makes some of the hierarchy walking
> redundant. I suspect that moving register init lets the
> devm_cxl_enumerate_ports() walk handle everything without new callbacks
> and new lookup infrastructure (patch8).
>
> I have long wanted to move cxl_port_setup_regs() out of cxl_port_add().
> It has always been an awkward fit their because register init is usually
> something that belongs in a ->probe() path.
next prev parent reply other threads:[~2025-07-22 19:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 22:35 [PATCH v7 00/10] cxl: Delay HB port and switch dport probing until endpoint dev probe Dave Jiang
2025-07-14 22:35 ` [PATCH v7 01/10] cxl/region: Add decoder check to check_commit_order() Dave Jiang
2025-07-21 11:33 ` Robert Richter
2025-07-21 20:18 ` dan.j.williams
2025-07-21 22:12 ` dan.j.williams
2025-07-21 23:18 ` Dave Jiang
2025-07-14 22:35 ` [PATCH v7 02/10] cxl: Add helper to detect top of CXL device topology Dave Jiang
2025-07-16 1:58 ` Alison Schofield
2025-07-21 20:23 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 03/10] cxl: Add helper to reap dport Dave Jiang
2025-07-16 1:59 ` Alison Schofield
2025-07-21 20:24 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 04/10] cxl: Defer dport allocation for switch ports Dave Jiang
2025-07-15 1:38 ` Li Ming
2025-07-16 2:00 ` Alison Schofield
2025-07-21 23:14 ` Robert Richter
2025-07-22 15:47 ` Dave Jiang
2025-07-22 15:50 ` dan.j.williams
2025-08-12 18:11 ` Dave Jiang
2025-07-14 22:35 ` [PATCH v7 05/10] cxl/test: Add cxl_test support for cxl_port_update_total_ports() Dave Jiang
2025-07-16 2:03 ` Alison Schofield
2025-07-22 16:24 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 06/10] cxl/test: Add mock version of devm_cxl_add_dport_by_dev() Dave Jiang
2025-07-16 2:04 ` Alison Schofield
2025-07-22 17:06 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 07/10] cxl: Change sslbis handler to only handle single dport Dave Jiang
2025-07-16 2:05 ` Alison Schofield
2025-07-21 23:18 ` Robert Richter
2025-07-21 23:25 ` Dave Jiang
2025-07-22 17:12 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 08/10] cxl: Create an xarray to tie a host bridge to the cxl_root Dave Jiang
2025-07-16 2:06 ` Alison Schofield
2025-07-14 22:35 ` [PATCH v7 09/10] cxl: Move enumeration of hostbridge ports to the memdev probe path Dave Jiang
2025-07-16 2:07 ` Alison Schofield
2025-07-22 18:31 ` dan.j.williams
2025-07-22 19:07 ` Dave Jiang [this message]
2025-07-22 19:28 ` dan.j.williams
2025-07-14 22:35 ` [PATCH v7 10/10] cxl: Remove devm_cxl_port_enumerate_dports() that is no longer used Dave Jiang
2025-07-16 2:09 ` Alison Schofield
2025-07-22 18:32 ` dan.j.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=893e2652-ce0a-4bfe-b601-ab651dcda2ef@intel.com \
--to=dave.jiang@intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=ming.li@zohomail.com \
--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.