Skip to content

Commit 568c5fe

Browse files
labbottwildea01
authored andcommitted
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>
1 parent 2dece44 commit 568c5fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/mm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
7676
#define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x)))
7777
#endif
7878

79+
#ifndef lm_alias
80+
#define lm_alias(x) __va(__pa_symbol(x))
81+
#endif
82+
7983
/*
8084
* To prevent common memory management code establishing
8185
* a zero page mapping on a read fault.

0 commit comments

Comments
 (0)