diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-03-17 16:37:03 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 23:57:31 +0200 |
commit | ee5aa8d3ba65d76157f22b7afedd089d8acfe524 (patch) | |
tree | bddbec4ffd9508c3bd7afaeebc15b28226022b6d /arch/x86/mm/pgtable.c | |
parent | 2761fa0920756dc471d297843646a4a9bca6656f (diff) | |
download | op-kernel-dev-ee5aa8d3ba65d76157f22b7afedd089d8acfe524.zip op-kernel-dev-ee5aa8d3ba65d76157f22b7afedd089d8acfe524.tar.gz |
x86/pgtable.h: demacro ptep_set_access_flags
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/pgtable.c')
-rw-r--r-- | arch/x86/mm/pgtable.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 5accc08..e7cda20 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -1,5 +1,6 @@ #include <linux/mm.h> #include <asm/pgalloc.h> +#include <asm/pgtable.h> #include <asm/tlb.h> pte_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) free_page((unsigned long)pgd); } #endif + +int ptep_set_access_flags(struct vm_area_struct *vma, + unsigned long address, pte_t *ptep, + pte_t entry, int dirty) +{ + int changed = !pte_same(*ptep, entry); + + if (changed && dirty) { + *ptep = entry; + pte_update_defer(vma->vm_mm, address, ptep); + flush_tlb_page(vma, address); + } + + return changed; +} |