Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 845fbd8e authored by Laura Abbott's avatar Laura Abbott Committed by Mark Salyzyn
Browse files

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: default avatarMark Rutland <mark.rutland@arm.com>
Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Bug: 20045882
Change-Id: I93ba4ef8df77f7e52717ab6e208d06122ac3a72b
parent 44a3afcc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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.