mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 07:24:39 +08:00
9e9a367c29
Add a method (hyp_idmap_setup) to populate a hyp pgd with an identity mapping of the code contained in the .hyp.idmap.text section. Offer a method to drop this identity mapping through hyp_idmap_teardown. Make all the above depend on CONFIG_ARM_VIRT_EXT and CONFIG_ARM_LPAE. Reviewed-by: Will Deacon <will.deacon@arm.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
16 lines
339 B
C
16 lines
339 B
C
#ifndef __ASM_IDMAP_H
|
|
#define __ASM_IDMAP_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <asm/pgtable.h>
|
|
|
|
/* Tag a function as requiring to be executed via an identity mapping. */
|
|
#define __idmap __section(.idmap.text) noinline notrace
|
|
|
|
extern pgd_t *idmap_pgd;
|
|
extern pgd_t *hyp_pgd;
|
|
|
|
void setup_mm_for_reboot(void);
|
|
|
|
#endif /* __ASM_IDMAP_H */
|