From 8fe627ec5b7c47b1654dff50536d9709863295a3 Mon Sep 17 00:00:00 2001 From: Gerald Schaefer Date: Mon, 28 Apr 2008 02:13:28 -0700 Subject: hugetlbfs: add missing TLB flush to hugetlb_cow() A cow break on a hugetlbfs page with page_count > 1 will set a new pte with set_huge_pte_at(), w/o any tlb flush operation. The old pte will remain in the tlb and subsequent write access to the page will result in a page fault loop, for as long as it may take until the tlb is flushed from somewhere else. This patch introduces an architecture-specific huge_ptep_clear_flush() function, which is called before the the set_huge_pte_at() in hugetlb_cow(). ATTENTION: This is just a nop on all architectures for now, the s390 implementation will come with our large page patch later. Other architectures should define their own huge_ptep_clear_flush() if needed. Acked-by: Martin Schwidefsky Signed-off-by: Gerald Schaefer Cc: Paul Mundt Cc: "Luck, Tony" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sparc64/hugetlb.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/asm-sparc64') diff --git a/include/asm-sparc64/hugetlb.h b/include/asm-sparc64/hugetlb.h index 7e111cfd31ea..0b9e44c85c5d 100644 --- a/include/asm-sparc64/hugetlb.h +++ b/include/asm-sparc64/hugetlb.h @@ -39,4 +39,9 @@ static inline void hugetlb_free_pgd_range(struct mmu_gather **tlb, free_pgd_range(tlb, addr, end, floor, ceiling); } +static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, + unsigned long addr, pte_t *ptep) +{ +} + #endif /* _ASM_SPARC64_HUGETLB_H */ -- cgit v1.2.3-70-g09d2