]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-ia64/pgalloc.h
[PATCH] autofs4 oops fix
[linux-2.6-omap-h63xx.git] / include / asm-ia64 / pgalloc.h
index e86a8c331ee641cfe574a08fe3280213583ca028..f2f23384647692d9e4d0ebec0b92f086828699a1 100644 (file)
@@ -29,7 +29,7 @@ DECLARE_PER_CPU(long, __pgtable_quicklist_size);
 
 static inline long pgtable_quicklist_total_size(void)
 {
-       long ql_size;
+       long ql_size = 0;
        int cpuid;
 
        for_each_online_cpu(cpuid) {
@@ -49,12 +49,12 @@ static inline void *pgtable_quicklist_alloc(void)
                pgtable_quicklist = (unsigned long *)(*ret);
                ret[0] = 0;
                --pgtable_quicklist_size;
+               preempt_enable();
        } else {
+               preempt_enable();
                ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
        }
 
-       preempt_enable();
-
        return ret;
 }
 
@@ -86,6 +86,25 @@ static inline void pgd_free(pgd_t * pgd)
        pgtable_quicklist_free(pgd);
 }
 
+#ifdef CONFIG_PGTABLE_4
+static inline void
+pgd_populate(struct mm_struct *mm, pgd_t * pgd_entry, pud_t * pud)
+{
+       pgd_val(*pgd_entry) = __pa(pud);
+}
+
+static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
+{
+       return pgtable_quicklist_alloc();
+}
+
+static inline void pud_free(pud_t * pud)
+{
+       pgtable_quicklist_free(pud);
+}
+#define __pud_free_tlb(tlb, pud)       pud_free(pud)
+#endif /* CONFIG_PGTABLE_4 */
+
 static inline void
 pud_populate(struct mm_struct *mm, pud_t * pud_entry, pmd_t * pmd)
 {