summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2015-03-24 15:02:38 +0100
committerWill Deacon <will.deacon@arm.com>2015-03-25 12:49:30 +0100
commit652261a7a86c884147930fa1e5ddd82a8a5748da (patch)
tree835b7489753d4a472301ccc104d5c295994ab0f6 /include
parentARM64 / ACPI: Get RSDP and ACPI boot-time tables (diff)
downloadlinux-652261a7a86c884147930fa1e5ddd82a8a5748da.tar.xz
linux-652261a7a86c884147930fa1e5ddd82a8a5748da.zip
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. CC: Rafael J Wysocki <rjw@rjwysocki.net> CC: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Robert Richter <rrichter@cavium.com> Tested-by: Timur Tabi <timur@codeaurora.org> Acked-by: Robert Richter <rrichter@cavium.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_io.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h
index 444671e9c65d..dd86c5fc102d 100644
--- a/include/acpi/acpi_io.h
+++ b/include/acpi/acpi_io.h
@@ -3,11 +3,15 @@
#include <linux/io.h>
+#include <asm/acpi.h>
+
+#ifndef acpi_os_ioremap
static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
acpi_size size)
{
return ioremap_cache(phys, size);
}
+#endif
void __iomem *__init_refok
acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);