]> Git Repo - linux.git/commitdiff
cxl: Preserve the CDAT access_coordinate for an endpoint
authorDave Jiang <[email protected]>
Wed, 4 Sep 2024 00:11:50 +0000 (17:11 -0700)
committerDave Jiang <[email protected]>
Mon, 23 Sep 2024 04:02:53 +0000 (21:02 -0700)
Keep the access_coordinate from the CDAT tables for region perf
calculations. The region perf calculation requires all participating
endpoints to have arrived in order to determine if there are limitations
of bandwidth data due to shared uplink.

Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Acked-by: Dan Williams <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Dave Jiang <[email protected]>
drivers/cxl/core/cdat.c
drivers/cxl/cxlmem.h

index e2e1ccda88fa1c0c3eed4c764bd2be745b1f4029..7bbf266a161245894888aff9e417ffb1037933d5 100644 (file)
@@ -14,7 +14,7 @@ struct dsmas_entry {
        struct range dpa_range;
        u8 handle;
        struct access_coordinate coord[ACCESS_COORDINATE_MAX];
-
+       struct access_coordinate cdat_coord[ACCESS_COORDINATE_MAX];
        int entries;
        int qos_class;
 };
@@ -162,7 +162,7 @@ static int cdat_dslbis_handler(union acpi_subtable_headers *header, void *arg,
        val = cdat_normalize(le16_to_cpu(le_val), le64_to_cpu(le_base),
                             dslbis->data_type);
 
-       cxl_access_coordinate_set(dent->coord, dslbis->data_type, val);
+       cxl_access_coordinate_set(dent->cdat_coord, dslbis->data_type, val);
 
        return 0;
 }
@@ -219,7 +219,7 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
        xa_for_each(dsmas_xa, index, dent) {
                int qos_class;
 
-               cxl_coordinates_combine(dent->coord, dent->coord, ep_c);
+               cxl_coordinates_combine(dent->coord, dent->cdat_coord, ep_c);
                dent->entries = 1;
                rc = cxl_root->ops->qos_class(cxl_root,
                                              &dent->coord[ACCESS_COORDINATE_CPU],
@@ -240,8 +240,10 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
 static void update_perf_entry(struct device *dev, struct dsmas_entry *dent,
                              struct cxl_dpa_perf *dpa_perf)
 {
-       for (int i = 0; i < ACCESS_COORDINATE_MAX; i++)
+       for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) {
                dpa_perf->coord[i] = dent->coord[i];
+               dpa_perf->cdat_coord[i] = dent->cdat_coord[i];
+       }
        dpa_perf->dpa_range = dent->dpa_range;
        dpa_perf->qos_class = dent->qos_class;
        dev_dbg(dev,
index c7c423ae16abb2101d1626d07349c2b9490cf25b..2a25d1957ddb9772b8d4dca92534ba76a909f8b3 100644 (file)
@@ -398,11 +398,13 @@ enum cxl_devtype {
  * struct cxl_dpa_perf - DPA performance property entry
  * @dpa_range: range for DPA address
  * @coord: QoS performance data (i.e. latency, bandwidth)
+ * @cdat_coord: raw QoS performance data from CDAT
  * @qos_class: QoS Class cookies
  */
 struct cxl_dpa_perf {
        struct range dpa_range;
        struct access_coordinate coord[ACCESS_COORDINATE_MAX];
+       struct access_coordinate cdat_coord[ACCESS_COORDINATE_MAX];
        int qos_class;
 };
 
This page took 0.062032 seconds and 4 git commands to generate.