summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pgalloc-32.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-11-19 12:50:04 +0000
committerPaul Mackerras <paulus@samba.org>2008-12-03 20:46:35 +1100
commit0186f47e703fb7aa14b54459d642ef5374b3a685 (patch)
tree5af0bc2bf92b9ef7edf79aab989387de4d8ffaaf /arch/powerpc/include/asm/pgalloc-32.h
parentdf3b8611554e389e703fa753540289874fa5126c (diff)
downloadblackbird-op-linux-0186f47e703fb7aa14b54459d642ef5374b3a685.tar.gz
blackbird-op-linux-0186f47e703fb7aa14b54459d642ef5374b3a685.zip
powerpc: Use RCU based pte freeing mechanism for all powerpc
Refactor the RCU based pte free code that was used on ppc64 to be used on all powerpc. Additionally refactor pte_free() & pte_free_kernel() into common code between ppc32 & ppc64. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/include/asm/pgalloc-32.h')
-rw-r--r--arch/powerpc/include/asm/pgalloc-32.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/pgalloc-32.h b/arch/powerpc/include/asm/pgalloc-32.h
index 58c07147b3ea..0815eb40acae 100644
--- a/arch/powerpc/include/asm/pgalloc-32.h
+++ b/arch/powerpc/include/asm/pgalloc-32.h
@@ -3,6 +3,8 @@
#include <linux/threads.h>
+#define PTE_NONCACHE_NUM 0 /* dummy for now to share code w/ppc64 */
+
extern void __bad_pte(pmd_t *pmd);
extern pgd_t *pgd_alloc(struct mm_struct *mm);
@@ -33,10 +35,13 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
-extern void pte_free_kernel(struct mm_struct *mm, pte_t *pte);
-extern void pte_free(struct mm_struct *mm, pgtable_t pte);
-#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, (pte))
+static inline void pgtable_free(pgtable_free_t pgf)
+{
+ void *p = (void *)(pgf.val & ~PGF_CACHENUM_MASK);
+
+ free_page((unsigned long)p);
+}
#define check_pgt_cache() do { } while (0)
OpenPOWER on IntegriCloud