aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/pgalloc.h
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-12-31 07:19:24 -0500
committerMatt Fleming <matt@console-pimps.org>2010-01-01 20:02:25 -0500
commit2a5eacca85d39d8b6dffae821d7d260f05584dc7 (patch)
treed3c686fffb3b181a6d9b6790ce912e308c45a0ce /arch/sh/include/asm/pgalloc.h
parentb4c892762373c5e59c7e8db35f5f9a7658602bda (diff)
sh: Move page table allocation out of line
We also switched away from quicklists and instead moved to slab caches. After benchmarking both implementations the difference is negligible. The slab caches suit us better though because the size of a pgd table is just 4 entries when we're using a 3-level page table layout and quicklists always deal with pages. Signed-off-by: Matt Fleming <matt@console-pimps.org>
Diffstat (limited to 'arch/sh/include/asm/pgalloc.h')
-rw-r--r--arch/sh/include/asm/pgalloc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h
index 4ea27855c3b..e106474996b 100644
--- a/arch/sh/include/asm/pgalloc.h
+++ b/arch/sh/include/asm/pgalloc.h
@@ -6,10 +6,13 @@
6 6
7#define QUICK_PT 1 /* Other page table pages that are zero on free */ 7#define QUICK_PT 1 /* Other page table pages that are zero on free */
8 8
9extern pgd_t *pgd_alloc(struct mm_struct *);
10extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
11
9#ifdef CONFIG_PGTABLE_LEVELS_3 12#ifdef CONFIG_PGTABLE_LEVELS_3
10#include <asm/pgalloc_pmd.h> 13extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
11#else 14extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
12#include <asm/pgalloc_nopmd.h> 15extern void pmd_free(struct mm_struct *mm, pmd_t *pmd);
13#endif 16#endif
14 17
15static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, 18static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
@@ -67,7 +70,6 @@ do { \
67 70
68static inline void check_pgt_cache(void) 71static inline void check_pgt_cache(void)
69{ 72{
70 __check_pgt_cache();
71 quicklist_trim(QUICK_PT, NULL, 25, 16); 73 quicklist_trim(QUICK_PT, NULL, 25, 16);
72} 74}
73 75