提交 a40695ed 编写于 作者: K Kent Yoder 提交者: James Morris

tpm: fix tpm_acpi sparse warning on different address spaces

acpi_os_map_memory expects its return value to be in the __iomem address
space. Tag the variable we're using as such and use memcpy_fromio to
avoid further sparse warnings.
Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: NJames Morris <james.l.morris@oracle.com>
上级 9ddf6aa8
......@@ -49,7 +49,7 @@ int read_log(struct tpm_bios_log *log)
{
struct acpi_tcpa *buff;
acpi_status status;
struct acpi_table_header *virt;
void __iomem *virt;
u64 len, start;
if (log->bios_event_log != NULL) {
......@@ -102,7 +102,7 @@ int read_log(struct tpm_bios_log *log)
return -EIO;
}
memcpy(log->bios_event_log, virt, len);
memcpy_fromio(log->bios_event_log, virt, len);
acpi_os_unmap_memory(virt, len);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册