aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2014-09-08 11:58:46 -0400
committerGraeme Gregory <graeme.gregory@linaro.org>2014-11-06 11:57:38 +0000
commit51c7d8ea331dfdb896a45ad065efb45692457ec3 (patch)
treefffc8614c71900cb305341a3cab865455266e409
parent7b433ffab4bc7ecbf209821d93afa035ec047c4b (diff)
downloadleg-kernel-51c7d8ea331dfdb896a45ad065efb45692457ec3.tar.gz
acpi: fix acpi_os_ioremap for arm64
The acpi_os_ioremap() function may be used to map normal RAM or IO regions. The current implementation simply uses ioremap_cache(). This will work for some architectures, but arm64 ioremap_cache() cannot be used to map IO regions which don't support caching. So for arm64, use ioremap() for non-RAM regions. Signed-off-by: Mark Salter <msalter@redhat.com>
-rw-r--r--include/acpi/acpi_io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h
index 444671e9c65d..9d573dbdb0a9 100644
--- a/include/acpi/acpi_io.h
+++ b/include/acpi/acpi_io.h
@@ -1,11 +1,17 @@
#ifndef _ACPI_IO_H_
#define _ACPI_IO_H_
+#include <linux/mm.h>
#include <linux/io.h>
static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
acpi_size size)
{
+#ifdef CONFIG_ARM64
+ if (!page_is_ram(phys >> PAGE_SHIFT))
+ return ioremap(phys, size);
+#endif
+
return ioremap_cache(phys, size);
}