]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/region: Move find_cxl_root() to cxl_add_to_region()
authorRobert Richter <rrichter@amd.com>
Fri, 9 May 2025 15:06:52 +0000 (17:06 +0200)
committerDave Jiang <dave.jiang@intel.com>
Fri, 9 May 2025 16:48:26 +0000 (09:48 -0700)
commit5ed826fc4bc6073e0083ed30c10f6a54da06b83b
treeb1926498b62785abb09ddbe7a3e90b11872983a6
parent0ee2d97810b9b1626d31a63f4a166f0a310b78e5
cxl/region: Move find_cxl_root() to cxl_add_to_region()

When adding an endpoint to a region, the root port is determined
first. Move this directly into cxl_add_to_region(). This is in
preparation of the initialization of endpoints that iterates the port
hierarchy from the endpoint up to the root port.

As a side-effect the root argument is removed from the argument lists
of cxl_add_to_region() and related functions. Now, the endpoint is the
only parameter to add a region. This simplifies the function
interface.

Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: "Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>
Tested-by: Gregory Price <gourry@gourry.net>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20250509150700.2817697-8-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/region.c
drivers/cxl/cxl.h
drivers/cxl/port.c