diff options
Diffstat (limited to 'include/asm-powerpc/pgalloc-64.h')
-rw-r--r-- | include/asm-powerpc/pgalloc-64.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h index 94d0294341d6..43214c8085b7 100644 --- a/include/asm-powerpc/pgalloc-64.h +++ b/include/asm-powerpc/pgalloc-64.h | |||
@@ -12,6 +12,10 @@ | |||
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
14 | 14 | ||
15 | #ifndef CONFIG_PPC_SUBPAGE_PROT | ||
16 | static inline void subpage_prot_free(pgd_t *pgd) {} | ||
17 | #endif | ||
18 | |||
15 | extern struct kmem_cache *pgtable_cache[]; | 19 | extern struct kmem_cache *pgtable_cache[]; |
16 | 20 | ||
17 | #define PGD_CACHE_NUM 0 | 21 | #define PGD_CACHE_NUM 0 |
@@ -27,6 +31,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
27 | 31 | ||
28 | static inline void pgd_free(pgd_t *pgd) | 32 | static inline void pgd_free(pgd_t *pgd) |
29 | { | 33 | { |
34 | subpage_prot_free(pgd); | ||
30 | kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd); | 35 | kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd); |
31 | } | 36 | } |
32 | 37 | ||