diff options
author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2024-11-04 11:18:29 +0530 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-11-04 15:13:45 +0200 |
commit | ba6ad33d5c870d8b1d22388292c872ba4af98ea1 (patch) | |
tree | 4b14f2bdeb6c5abb555113d357d161efbcb7599e /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ac4976a4f8709dc88ba3a4475e41b5682b2fe1d7 (diff) |
platform/x86/amd/pmf: Switch to platform_get_resource() and devm_ioremap_resource()
Use platform_get_resource() to fetch the memory resource instead of
acpi_walk_resources() and devm_ioremap_resource() for mapping the
resources.
PS: We cannot use resource_size() here because it adds an extra byte to
round off the size. In the case of PMF ResourceTemplate(), this rounding
is already handled within the _CRS. Using resource_size() would increase
the resource size by 1, causing a mismatch with the length field and
leading to issues. Therefore, simply use end-start of the ACPI resource to
obtain the actual length.
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20241104054829.620858-4-Shyam-sundar.S-k@amd.com
[ij: added a cast to resource_size_t printing]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions