We can't turn them into macros because we're expecting to be able to
take the address of __ptep_modify_prot_start/commit. What type is not
defined on s390 at that point? Would simply adding an extra include to
arch/s390/mm/hugetlbpage.c fix the problem?
In the worst case we could push __ptep_modify_proc_start/commit out of
line somewhere appropriate, but that's a bit sad given how simple they are.
J
quoted text > Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> include/asm-generic/pgtable.h | 26 +++++++++-----------------
> 1 file changed, 9 insertions(+), 17 deletions(-)
>
> diff -puN include/asm-generic/pgtable.h~s390-build-fixes include/asm-generic/pgtable.h
> --- a/include/asm-generic/pgtable.h~s390-build-fixes
> +++ a/include/asm-generic/pgtable.h
> @@ -197,17 +197,13 @@ static inline int pmd_none_or_clear_bad(
> }
> #endif /* CONFIG_MMU */
>
> -static inline pte_t __ptep_modify_prot_start(struct mm_struct *mm,
> - unsigned long addr,
> - pte_t *ptep)
> -{
> - /*
> - * Get the current pte state, but zero it out to make it
> - * non-present, preventing the hardware from asynchronously
> - * updating it.
> - */
> - return ptep_get_and_clear(mm, addr, ptep);
> -}
> +/*
> + * Get the current pte state, but zero it out to make it
> + * non-present, preventing the hardware from asynchronously
> + * updating it.
> + */
> +#define __ptep_modify_prot_start(mm, addr, ptep) \
> + ptep_get_and_clear(mm, addr, ptep)
>
> static inline void __ptep_modify_prot_commit(struct mm_struct *mm,
> unsigned long addr,
> @@ -235,12 +231,8 @@ static inline void __ptep_modify_prot_co
> * queue the update to be done at some later time. The update must be
> * actually committed before the pte lock is released, however.
> */
> -static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,
> - unsigned long addr,
> - pte_t *ptep)
> -{
> - return __ptep_modify_prot_start(mm, addr, ptep);
> -}
> +#define ptep_modify_prot_start(mm, addr, ptep) \
> + __ptep_modify_prot_start(mm, addr, ptep)
>
> /*
> * Commit an update to a pte, leaving any hardware-controlled bits in
> _
>
>
>