diff options
author | Mark Rutland <mark.rutland@arm.com> | 2018-04-12 12:11:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-20 08:20:44 +0200 |
commit | 09ea80a05c6a08d0419fa3875a2612f4c462d9d5 (patch) | |
tree | 2ad7e2c7bee7449595a0d775d68c815b86aa7df7 /include/linux | |
parent | bfacceccc8fd9fd30f70563569d7bd1d1453a841 (diff) |
mm: Introduce lm_alias
From: Laura Abbott <labbott@redhat.com>
commit 568c5fe5a54f2654f5a4c599c45b8a62ed9a2013 upstream.
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>
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8e506783631b..4a07ff4f38e1 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. |