summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-01-10 13:35:42 -0800
committerMark Salyzyn <salyzyn@google.com>2017-11-20 13:50:07 -0800
commitb11250d2adedb7fc5965ff4ac410df40fb073f3a (patch)
treef9eeb14d2aa4ac7a5eef5f37b35906903a48cd82 /include/linux/mm.h
parent7eab308a49db1596e7dca26bbcaffdedf6818e9b (diff)
UPSTREAM: mm: Introduce lm_alias
(cherry-pick from commit 568c5fe5a54f2654f5a4c599c45b8a62ed9a2013) 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> Bug: 20045882 Bug: 63737556 Change-Id: I93ba4ef8df77f7e52717ab6e208d06122ac3a72b
Diffstat (limited to 'include/linux/mm.h')
-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 e51aafbc4b3a..941c7f711ada 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -70,6 +70,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
#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.