aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jiang <[email protected]>2024-03-08 14:59:26 -0700
committerDan Williams <[email protected]>2024-03-12 12:34:11 -0700
commit6ef83c4e19e9ce20a05127eec8a10911cf3516a7 (patch)
tree5f96b10dea54c7a94a63ca69a6a072d3a45a7da7
parent863027d40993f13155451bd898bfe4c4e9b7002f (diff)
cxl: Move QoS class to be calculated from the nearest CPU
Retrieve the qos_class (QTG ID) using the access coordinates from the nearest CPU rather than the nearst initiator that may not be a CPU. This may be the more appropriate number that applications care about. For most cases, access0 and access1 have the same values. Link: https://lore.kernel.org/linux-cxl/[email protected]/ Suggested-by: Jonathan Cameron <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Tested-by: Jonathan Cameron <[email protected]> Signed-off-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
-rw-r--r--drivers/cxl/core/cdat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c
index 04dfda9d1f1b..02e97a90a43c 100644
--- a/drivers/cxl/core/cdat.c
+++ b/drivers/cxl/core/cdat.c
@@ -198,12 +198,12 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
* coordinates in order to allow calculation of access class
* 0 and 1 for region later.
*/
- cxl_coordinates_combine(&coord[ACCESS_COORDINATE_LOCAL],
- &coord[ACCESS_COORDINATE_LOCAL],
+ cxl_coordinates_combine(&coord[ACCESS_COORDINATE_CPU],
+ &coord[ACCESS_COORDINATE_CPU],
&dent->coord);
dent->entries = 1;
rc = cxl_root->ops->qos_class(cxl_root,
- &coord[ACCESS_COORDINATE_LOCAL],
+ &coord[ACCESS_COORDINATE_CPU],
1, &qos_class);
if (rc != 1)
continue;