ACPI: HMAT / cxl: Add retrieval of generic port coordinates for both access classes
[linux-2.6-microblaze.git] / drivers / cxl / acpi.c
index 1a3e6aa..af5cb81 100644 (file)
@@ -530,13 +530,15 @@ static int get_genport_coordinates(struct device *dev, struct cxl_dport *dport)
        if (kstrtou32(acpi_device_uid(hb), 0, &uid))
                return -EINVAL;
 
-       rc = acpi_get_genport_coordinates(uid, &dport->hb_coord);
+       rc = acpi_get_genport_coordinates(uid, dport->hb_coord);
        if (rc < 0)
                return rc;
 
        /* Adjust back to picoseconds from nanoseconds */
-       dport->hb_coord.read_latency *= 1000;
-       dport->hb_coord.write_latency *= 1000;
+       for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) {
+               dport->hb_coord[i].read_latency *= 1000;
+               dport->hb_coord[i].write_latency *= 1000;
+       }
 
        return 0;
 }