diff options
author | Dave Jiang <dave.jiang@intel.com> | 2024-03-08 14:59:23 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2024-03-12 12:34:11 -0700 |
commit | bd98cbbbf82a3086423865816e1b5ab4bb4b6c60 (patch) | |
tree | 9323fd500efac416ee9be2bc012cc1324b8a7fe8 /drivers/acpi | |
parent | 1745a7b364dfd339ab2696b7d51d7ed950ed2598 (diff) | |
download | linux-stable-bd98cbbbf82a3086423865816e1b5ab4bb4b6c60.tar.gz linux-stable-bd98cbbbf82a3086423865816e1b5ab4bb4b6c60.tar.bz2 linux-stable-bd98cbbbf82a3086423865816e1b5ab4bb4b6c60.zip |
ACPI: HMAT / cxl: Add retrieval of generic port coordinates for both access classes
Update acpi_get_genport_coordinates() to allow retrieval of both access
classes of the 'struct access_coordinate' for a generic target. The update
will allow CXL code to compute access coordinates for both access class.
Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20240308220055.2172956-5-dave.jiang@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/numa/hmat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index a1257888a6df..75e9aac43228 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -126,7 +126,8 @@ static struct memory_target *acpi_find_genport_target(u32 uid) /** * acpi_get_genport_coordinates - Retrieve the access coordinates for a generic port * @uid: ACPI unique id - * @coord: The access coordinates written back out for the generic port + * @coord: The access coordinates written back out for the generic port. + * Expect 2 levels array. * * Return: 0 on success. Errno on failure. * @@ -142,7 +143,10 @@ int acpi_get_genport_coordinates(u32 uid, if (!target) return -ENOENT; - *coord = target->coord[NODE_ACCESS_CLASS_GENPORT_SINK_LOCAL]; + coord[ACCESS_COORDINATE_LOCAL] = + target->coord[NODE_ACCESS_CLASS_GENPORT_SINK_LOCAL]; + coord[ACCESS_COORDINATE_CPU] = + target->coord[NODE_ACCESS_CLASS_GENPORT_SINK_CPU]; return 0; } |