6 #include <linux/kernel.h>
13 #include <asm/pgtable.h>
14 #include <asm/pgalloc.h>
15 #include <asm/tlbflush.h>
16 #include <asm/cacheflush.h>
17 #include <asm/mmu_context.h>
87 if (PageReserved(page))
91 mapping = page_mapping(page);
96 if ((paddr ^ vaddr) & (1 << 13))
102 tlb_batch_add_one(mm, vaddr,
pte_exec(orig));
105 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
106 static void tlb_batch_pmd_scan(
struct mm_struct *mm,
unsigned long vaddr,
114 while (vaddr < end) {
116 tlb_batch_add_one(mm, vaddr, exec);
143 bool exec = ((
pmd_val(orig) & PMD_HUGE_EXEC) != 0);
146 if (
pmd_val(orig) & PMD_ISHUGE)
147 tlb_batch_add_one(mm, addr, exec);
149 tlb_batch_pmd_scan(mm, addr, orig, exec);
160 if (!mm->pmd_huge_pte)
163 list_add(lh, (
struct list_head *) mm->pmd_huge_pte);
164 mm->pmd_huge_pte = pgtable;
175 pgtable = mm->pmd_huge_pte;
178 mm->pmd_huge_pte =
NULL;