summaryrefslogtreecommitdiffstats
path: root/include/linux/acpi_io.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-01-19 22:27:14 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-20 18:30:17 -0800
commit2d6d9fd3a54a28c6f67f26eb6c74803307a1b11e (patch)
tree0d7c54159ca8e9c4d4e113597d3c7c08d9f98e84 /include/linux/acpi_io.h
parent8d99641f6c1af806cd5d9e6badce91910219a161 (diff)
downloadop-kernel-dev-2d6d9fd3a54a28c6f67f26eb6c74803307a1b11e.zip
op-kernel-dev-2d6d9fd3a54a28c6f67f26eb6c74803307a1b11e.tar.gz
ACPI: Introduce acpi_os_ioremap()
Commit ca9b600be38c ("ACPI / PM: Make suspend_nvs_save() use acpi_os_map_memory()") attempted to prevent the code in osl.c and nvs.c from using different ioremap() variants by making the latter use acpi_os_map_memory() for mapping the NVS pages. However, that also requires acpi_os_unmap_memory() to be used for unmapping them, which causes synchronize_rcu() to be executed many times in a row unnecessarily and introduces substantial delays during resume on some systems. Instead of using acpi_os_map_memory() for mapping the NVS pages in nvs.c introduce acpi_os_ioremap() calling ioremap_cache() and make the code in both osl.c and nvs.c use it. Reported-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/acpi_io.h')
-rw-r--r--include/linux/acpi_io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/acpi_io.h b/include/linux/acpi_io.h
new file mode 100644
index 0000000..7180013
--- /dev/null
+++ b/include/linux/acpi_io.h
@@ -0,0 +1,16 @@
+#ifndef _ACPI_IO_H_
+#define _ACPI_IO_H_
+
+#include <linux/io.h>
+#include <acpi/acpi.h>
+
+static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
+ acpi_size size)
+{
+ return ioremap_cache(phys, size);
+}
+
+int acpi_os_map_generic_address(struct acpi_generic_address *addr);
+void acpi_os_unmap_generic_address(struct acpi_generic_address *addr);
+
+#endif
OpenPOWER on IntegriCloud