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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 858bd78 commit 02a258a

File tree

1 file changed

+1
-1
lines changed
  • drivers/platform/x86/amd

1 file changed

+1
-1
lines changed

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)