mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 19:42:26 +00:00
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 <[email protected]> Reviewed-by: Marcelo Tosatti <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Christoffer Dall <[email protected]>
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 */
|