linux-cxl.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Dave Jiang <dave.jiang@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>, <dan.j.williams@intel.com>,
	<rrichter@amd.com>
Subject: Re: [PATCH] cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH
Date: Fri, 26 Apr 2024 17:10:07 -0700	[thread overview]
Message-ID: <662c425f15f73_b6e0294dd@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <20240426224913.1027420-1-dave.jiang@intel.com>

Dave Jiang wrote:
> Robert reported the following when booting a CXL host with Restricted CXL
> Host (RCH) topology:
>  [   39.815379] cxl_acpi ACPI0017:00: not a cxl_port device
>  [   39.827123] WARNING: CPU: 46 PID: 1754 at drivers/cxl/core/port.c:592 to_cxl_port+0x56/0x70 [cxl_core]
> 
> ... plus some related subsequent NULL pointer dereference:
> 
>  [   40.718708] BUG: kernel NULL pointer dereference, address: 00000000000002d8
> 
> The iterator to walk the PCIe path did not account for RCH topology.
> However RCH does not support hotplug and the memory exported by the
> Restricted CXL Device (RCD) should be covered by HMAT and therefore no
> access_coordinate is needed. Add check to see if the endpoint device is
> RCD and skip calculation.
> 
> Also add a call to cxl_endpoint_get_perf_coordinates() in cxl_test in order
> to exercise the topology iterator. The dev_is_pci() check added is to help
> with this test and should be harmless for normal operation.
> 
> Reported-by: Robert Richter <rrichter@amd.com>
> Closes: https://lore.kernel.org/all/Ziv8GfSMSbvlBB0h@rric.localdomain/
> Fixes: 592780b8391f ("cxl: Fix retrieving of access_coordinates in PCIe path")
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> 
> Hi Robert,
> Can you please try this patch and see if it addresses the issue you saw
> on your RCH platform? Thanks!

Definitely wait for that test result, but as for the patch and the
approach it looks good to me. It matches other RCH-topology-walk skips
like the one in devm_cxl_enumerate_ports().

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

Now, that said, if someone can think of why the driver needs to do
dynamic performance enumeration for RCH (i.e. a platform BIOS does not
populate HMAT), they should speak up now.

  reply	other threads:[~2024-04-27  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 22:47 [PATCH] cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH Dave Jiang
2024-04-27  0:10 ` Dan Williams [this message]
2024-04-29 12:23   ` Robert Richter
2024-04-30 16:54     ` Jonathan Cameron
2024-04-29 12:00 ` Robert Richter
2024-04-29 15:56   ` 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=662c425f15f73_b6e0294dd@dwillia2-mobl3.amr.corp.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@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=rrichter@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).