b/arch/arm/include/asm/pgtable-3level-hwdef.h
@@ -50,6 +50,7 @@
#define PMD_SECT_AP_READ (_AT(pmdval_t, 0))
#define PMD_SECT_AP1 (_AT(pmdval_t, 1) << 6)
#define PMD_SECT_TEX(x) (_AT(pmdval_t, 0))
+#define PMD_SECT_HYP PMD_SECT_AP1
/*
* AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).
@@ -1,4 +1,3 @@
-#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -97,7 +96,7 @@ static int __init init_static_idmap_hyp(void)
pr_info("Setting up static HYP identity map for 0x%p - 0x%p\n",
__hyp_idmap_text_start, __hyp_idmap_text_end);
identity_mapping_add(hyp_pgd, __hyp_idmap_text_start,
- __hyp_idmap_text_end, PMD_SECT_AP1);
+ __hyp_idmap_text_end, PMD_SECT_HYP);
return 0;
}