alpha: make pte_alloc_one_kernel() inline
PATCH 5/5 alpha: make pte_alloc_one_kernel() inline
As it's just a single call to __get_free_page().
Signed-off-by Ivan Kokshaysky <[email protected]>
--- arch/alpha/include/asm/pgalloc.h | 7 ++++++- arch/alpha/mm/init.c | 7 ------- 2 files changed, 6 insertions(+), 8 deletions(-)
arch/alpha/include/asm/pgalloc.h +6 -1
@@ -50,7 +50,12 @@ pmd_free(struct mm_struct *mm, pmd_t *pmd)free_page ((unsigned long )pmd); } -extern pte_t *pte_alloc_one_kernel (struct mm_struct *mm,unsigned long addr); +static inline pte_t * +pte_alloc_one_kernel (struct mm_struct *mm,unsigned long address) +{ +pte_t *pte = (pte_t *)__get_free_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO); +return pte; +}static inline void pte_free_kernel (struct mm_struct *mm,pte_t *pte)
arch/alpha/mm/init.c +0 -7
@@ -59,13 +59,6 @@ pgd_alloc(struct mm_struct *mm)return ret; } -pte_t * -pte_alloc_one_kernel (struct mm_struct *mm,unsigned long address) -{ -pte_t *pte = (pte_t *)__get_free_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO); -return pte; -} -/* * BAD_PAGE is the page that is used for page faults when linux