24 #include <linux/kernel.h>
31 #include <asm/pgalloc.h>
32 #include <asm/tlbflush.h>
37 static inline int is_exec_fault(
void)
47 static inline int pte_looks_normal(
pte_t pte)
56 unsigned long pfn =
pte_pfn(pte);
62 if (PageReserved(page))
67 #if defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0
93 _tlbil_va(addr, 0, 0, 0);
114 static pte_t set_pte_filter(
pte_t pte,
unsigned long addr)
132 if (is_exec_fault()) {
152 if (dirty || (
pte_val(pte) & _PAGE_EXEC) || !is_exec_fault())
155 #ifdef CONFIG_DEBUG_VM
189 #ifdef CONFIG_DEBUG_VM
196 pte = set_pte_filter(pte, addr);
199 __set_pte_at(mm, addr, ptep, pte, 0);
213 entry = set_access_flags_filter(entry, vma, dirty);
214 changed = !
pte_same(*(ptep), entry);
216 if (!is_vm_hugetlb_page(vma))
217 assert_pte_locked(vma->
vm_mm, address);
218 __ptep_set_access_flags(ptep, entry);
224 #ifdef CONFIG_DEBUG_VM
225 void assert_pte_locked(
struct mm_struct *mm,
unsigned long addr)