Re: [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_faultunconditionally

From: David Rientjes
Date: Mon Nov 19 2012 - 16:39:26 EST


On Sun, 18 Nov 2012, Josh Triplett wrote:

> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 3f39803..8ed2187 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -55,6 +55,10 @@ extern pmd_t *page_check_address_pmd(struct page *page,
>
> extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
>
> +extern int handle_pte_fault(struct mm_struct *mm,
> + struct vm_area_struct *vma, unsigned long address,
> + pte_t *pte, pmd_t *pmd, unsigned int flags);
> +
> #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> #define HPAGE_PMD_SHIFT HPAGE_SHIFT
> #define HPAGE_PMD_MASK HPAGE_MASK
> @@ -87,9 +91,6 @@ extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> pmd_t *dst_pmd, pmd_t *src_pmd,
> struct vm_area_struct *vma,
> unsigned long addr, unsigned long end);
> -extern int handle_pte_fault(struct mm_struct *mm,
> - struct vm_area_struct *vma, unsigned long address,
> - pte_t *pte, pmd_t *pmd, unsigned int flags);
> extern int split_huge_page(struct page *page);
> extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
> #define split_huge_page_pmd(__mm, __pmd) \

huge_mm.h is the last place someone would expect to see the prototype for
this function and it only exists because the thp code needs to use it and
it was the easy place to put it. Perhaps declare this in mm.h instead
where the declaration of handle_mm_fault() is?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/