summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-01-10 13:35:42 -0800
committerWill Deacon <will.deacon@arm.com>2017-01-11 13:56:49 +0000
commit568c5fe5a54f2654f5a4c599c45b8a62ed9a2013 (patch)
tree1c3f81b9fa7918f5590efd74072ebc40ebc7cfb4
parent2dece445b6dbdaa3d94f38ef44aa1b63bc2a6bb9 (diff)
downloadop-kernel-dev-568c5fe5a54f2654f5a4c599c45b8a62ed9a2013.zip
op-kernel-dev-568c5fe5a54f2654f5a4c599c45b8a62ed9a2013.tar.gz
mm: Introduce lm_alias
Certain architectures may have the kernel image mapped separately to alias the linear map. Introduce a macro lm_alias to translate a kernel image symbol into its linear alias. This is used in part with work to add CONFIG_DEBUG_VIRTUAL support for arm64. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--include/linux/mm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index fe6b403..5dc9c46 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -76,6 +76,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
#define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x)))
#endif
+#ifndef lm_alias
+#define lm_alias(x) __va(__pa_symbol(x))
+#endif
+
/*
* To prevent common memory management code establishing
* a zero page mapping on a read fault.
OpenPOWER on IntegriCloud