Skip to content

Commit 02a258a

Browse files
Wer-Wolfij-intel
authored andcommitted
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: 5150542 ("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>
1 parent 858bd78 commit 02a258a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/platform/x86/amd

drivers/platform/x86/amd/hsmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static ssize_t hsmp_metric_tbl_read(struct file *filp, struct kobject *kobj,
362362
ret = hsmp_send_message(&msg);
363363
if (ret)
364364
return ret;
365-
memcpy(buf, sock->metric_tbl_addr, bin_attr->size);
365+
memcpy_fromio(buf, sock->metric_tbl_addr, bin_attr->size);
366366

367367
return bin_attr->size;
368368
}

0 commit comments

Comments
 (0)