]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/pgalloc-64.h
[POWERPC] Provide a way to protect 4k subpages when using 64k pages
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / pgalloc-64.h
index 94d0294341d65a90006669e2a9bfd7851ab37452..43214c8085b7f36cdf44a205e8c5fac8a3aad7b1 100644 (file)
 #include <linux/cpumask.h>
 #include <linux/percpu.h>
 
+#ifndef CONFIG_PPC_SUBPAGE_PROT
+static inline void subpage_prot_free(pgd_t *pgd) {}
+#endif
+
 extern struct kmem_cache *pgtable_cache[];
 
 #define PGD_CACHE_NUM          0
@@ -27,6 +31,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 
 static inline void pgd_free(pgd_t *pgd)
 {
+       subpage_prot_free(pgd);
        kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd);
 }