aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pgtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pgtable.c')
-rw-r--r--arch/x86/mm/pgtable.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 5accc08683c7..e7cda2057e1d 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -1,5 +1,6 @@
1#include <linux/mm.h> 1#include <linux/mm.h>
2#include <asm/pgalloc.h> 2#include <asm/pgalloc.h>
3#include <asm/pgtable.h>
3#include <asm/tlb.h> 4#include <asm/tlb.h>
4 5
5pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) 6pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
@@ -264,3 +265,18 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd)
264 free_page((unsigned long)pgd); 265 free_page((unsigned long)pgd);
265} 266}
266#endif 267#endif
268
269int ptep_set_access_flags(struct vm_area_struct *vma,
270 unsigned long address, pte_t *ptep,
271 pte_t entry, int dirty)
272{
273 int changed = !pte_same(*ptep, entry);
274
275 if (changed && dirty) {
276 *ptep = entry;
277 pte_update_defer(vma->vm_mm, address, ptep);
278 flush_tlb_page(vma, address);
279 }
280
281 return changed;
282}