Message ID | 167468465444.586774.9409731200278259584.stgit@dwillia2-xfh.jf.intel.com |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/3] cxl/mem: Quiet port walking warnings | expand |
On Wed, 25 Jan 2023 14:11:17 -0800 Dan Williams <dan.j.williams@intel.com> wrote: > The cxl_mem driver attempts to establish, or revalidate, the cxl_port > hierarcy to attach a cxl_memdev to a CXL platform topology. There is a > natural race (on ACPI platforms) between when the cxl_mem driver > attempts to attach and when the cxl_acpi driver establishes the root of > the topology. > > If cxl_mem_probe() runs first it will iterate to the top of the device > topology without finding the CXL platform root. That situation is benign > / expected, so stop warning about it. The cxl_acpi driver will poke > cxl_mem_probe() to try again once the CXL platform root is established. > > Suppress any upper level errors by making it clear that this is merely a > probe deferral event, not a hard error. > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > Changes since v1: > * Use dev_err_probe() (Jonathan) > > drivers/cxl/core/port.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c > index b631a0520456..feb8f84a9281 100644 > --- a/drivers/cxl/core/port.c > +++ b/drivers/cxl/core/port.c > @@ -1397,9 +1397,10 @@ int devm_cxl_enumerate_ports(struct cxl_memdev *cxlmd) > > uport_dev = dport_dev->parent; > if (!uport_dev) { > - dev_warn(dev, "at %s no parent for dport: %s\n", > - dev_name(iter), dev_name(dport_dev)); > - return -ENXIO; > + dev_err_probe(dev, -EPROBE_DEFER, > + "at %s no parent for dport: %s\n", > + dev_name(iter), dev_name(dport_dev)); > + return -EPROBE_DEFER; > } > > dev_dbg(dev, "scan: iter: %s dport_dev: %s parent: %s\n", >
On 25.01.23 14:11:17, Dan Williams wrote: > The cxl_mem driver attempts to establish, or revalidate, the cxl_port > hierarcy to attach a cxl_memdev to a CXL platform topology. There is a > natural race (on ACPI platforms) between when the cxl_mem driver > attempts to attach and when the cxl_acpi driver establishes the root of > the topology. > > If cxl_mem_probe() runs first it will iterate to the top of the device > topology without finding the CXL platform root. That situation is benign > / expected, so stop warning about it. The cxl_acpi driver will poke > cxl_mem_probe() to try again once the CXL platform root is established. > > Suppress any upper level errors by making it clear that this is merely a > probe deferral event, not a hard error. > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Robert Richter <rrichter@amd.com>
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index b631a0520456..feb8f84a9281 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -1397,9 +1397,10 @@ int devm_cxl_enumerate_ports(struct cxl_memdev *cxlmd) uport_dev = dport_dev->parent; if (!uport_dev) { - dev_warn(dev, "at %s no parent for dport: %s\n", - dev_name(iter), dev_name(dport_dev)); - return -ENXIO; + dev_err_probe(dev, -EPROBE_DEFER, + "at %s no parent for dport: %s\n", + dev_name(iter), dev_name(dport_dev)); + return -EPROBE_DEFER; } dev_dbg(dev, "scan: iter: %s dport_dev: %s parent: %s\n",
The cxl_mem driver attempts to establish, or revalidate, the cxl_port hierarcy to attach a cxl_memdev to a CXL platform topology. There is a natural race (on ACPI platforms) between when the cxl_mem driver attempts to attach and when the cxl_acpi driver establishes the root of the topology. If cxl_mem_probe() runs first it will iterate to the top of the device topology without finding the CXL platform root. That situation is benign / expected, so stop warning about it. The cxl_acpi driver will poke cxl_mem_probe() to try again once the CXL platform root is established. Suppress any upper level errors by making it clear that this is merely a probe deferral event, not a hard error. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- Changes since v1: * Use dev_err_probe() (Jonathan) drivers/cxl/core/port.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)