]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mm/idmap.c
ARM: mm: Introduce virt_to_idmap() with an arch hook
[karo-tx-linux.git] / arch / arm / mm / idmap.c
index 83cb3ac27095146f3f60c04047c6b212856a73b2..c0a1e48f67338617cb2f7aeed88f67daad97d719 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/system_info.h>
 
 pgd_t *idmap_pgd;
+phys_addr_t (*arch_virt_to_idmap) (unsigned long x);
 
 #ifdef CONFIG_ARM_LPAE
 static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
@@ -67,8 +68,8 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start,
        unsigned long addr, end;
        unsigned long next;
 
-       addr = virt_to_phys(text_start);
-       end = virt_to_phys(text_end);
+       addr = virt_to_idmap(text_start);
+       end = virt_to_idmap(text_end);
 
        prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF;