diff options
author | Armin Wolf <W_Armin@gmx.de> | 2023-10-19 16:51:22 +0300 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-10-25 12:29:44 +0300 |
commit | 02a258ac3ebf8a530d340ec24a694c13ac9d25c0 (patch) | |
tree | e98b2d91e5782324f9f5e35f5f0ddbe62fcd226c /drivers | |
parent | 858bd78c9d324781217bb42a87766ca9194809ca (diff) | |
download | linux-02a258ac3ebf8a530d340ec24a694c13ac9d25c0.tar.xz |
platform/x86/amd/hsmp: Fix iomem handling
Since the metrics table is marked as io memory, use memcpy_fromio()
when copying its contents.
Compile-tested only.
Fixes: 5150542b8ec5 ("platform/x86/amd/hsmp: add support for metrics tbl")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231019135122.21774-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/amd/hsmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/amd/hsmp.c b/drivers/platform/x86/amd/hsmp.c index b056a5c8654a..b55d80e29139 100644 --- a/drivers/platform/x86/amd/hsmp.c +++ b/drivers/platform/x86/amd/hsmp.c @@ -362,7 +362,7 @@ static ssize_t hsmp_metric_tbl_read(struct file *filp, struct kobject *kobj, ret = hsmp_send_message(&msg); if (ret) return ret; - memcpy(buf, sock->metric_tbl_addr, bin_attr->size); + memcpy_fromio(buf, sock->metric_tbl_addr, bin_attr->size); return bin_attr->size; } |