Commit c9e1750c authored by Linus Torvalds's avatar Linus Torvalds

Pass in a "dirty" argument to ptep_establish in

preparation for pte update race fix.

This does not actually use the information yet, but
the next few patches will start to put it to some
good use.
parent 51f17423
......@@ -10,7 +10,7 @@
*
* We hold the mm semaphore for reading and vma->vm_mm->page_table_lock
*/
#define ptep_establish(__vma, __address, __ptep, __entry) \
#define ptep_establish(__vma, __address, __ptep, __entry, __dirty) \
do { \
set_pte(__ptep, __entry); \
flush_tlb_page(__vma, __address); \
......
......@@ -580,7 +580,8 @@ static inline void ptep_mkdirty(pte_t *ptep)
static inline void
ptep_establish(struct vm_area_struct *vma,
unsigned long address, pte_t *ptep, pte_t entry)
unsigned long address, pte_t *ptep,
pte_t entry, int dirty)
{
ptep_clear_flush(vma, address, ptep);
set_pte(ptep, entry);
......
......@@ -1004,7 +1004,7 @@ static inline void break_cow(struct vm_area_struct * vma, struct page * new_page
flush_cache_page(vma, address);
entry = maybe_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot)),
vma);
ptep_establish(vma, address, page_table, entry);
ptep_establish(vma, address, page_table, entry, 1);
update_mmu_cache(vma, address, entry);
}
......@@ -1056,7 +1056,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
flush_cache_page(vma, address);
entry = maybe_mkwrite(pte_mkyoung(pte_mkdirty(pte)),
vma);
ptep_establish(vma, address, page_table, entry);
ptep_establish(vma, address, page_table, entry, 1);
update_mmu_cache(vma, address, entry);
pte_unmap(page_table);
spin_unlock(&mm->page_table_lock);
......@@ -1646,7 +1646,7 @@ static inline int handle_pte_fault(struct mm_struct *mm,
entry = pte_mkdirty(entry);
}
entry = pte_mkyoung(entry);
ptep_establish(vma, address, pte, entry);
ptep_establish(vma, address, pte, entry, write_access);
update_mmu_cache(vma, address, entry);
pte_unmap(pte);
spin_unlock(&mm->page_table_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment