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>
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;
}