Skip to content

Commit

Permalink
alpha: make pte_alloc_one_kernel() inline
Browse files Browse the repository at this point in the history
As it's just a single call to __get_free_page().

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Jan 16, 2009
1 parent 6946ce0 commit 5da7f3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 6 additions & 1 deletion arch/alpha/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions arch/alpha/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5da7f3d

Please sign in to comment.