]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPI / tables: table upgrade: use cacheable map for tables
authorAleksey Makarov <aleksey.makarov@linaro.org>
Mon, 20 Jun 2016 10:56:09 +0000 (13:56 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 21 Jun 2016 23:16:14 +0000 (01:16 +0200)
The new memory allocated in acpi_table_initrd_init() is used to
copy the upgraded tables to it.  So it should be mapped with
early_memunmap() instead of early_ioremap().

This is critical for ARM.

Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/tables.c

index a372f9eaa15deb8999abc60a4f0de2d7a9579cdd..f829e6a2e66325f725e07bfb081513a78da0c65f 100644 (file)
@@ -578,10 +578,10 @@ static void __init acpi_table_initrd_init(void *data, size_t size)
                        clen = size;
                        if (clen > MAP_CHUNK_SIZE - slop)
                                clen = MAP_CHUNK_SIZE - slop;
-                       dest_p = early_ioremap(dest_addr & PAGE_MASK,
-                                                clen + slop);
+                       dest_p = early_memremap(dest_addr & PAGE_MASK,
+                                               clen + slop);
                        memcpy(dest_p + slop, src_p, clen);
-                       early_iounmap(dest_p, clen + slop);
+                       early_memunmap(dest_p, clen + slop);
                        src_p += clen;
                        dest_addr += clen;
                        size -= clen;