]> err.no Git - linux-2.6/blobdiff - include/asm-ia64/pgalloc.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6] / include / asm-ia64 / pgalloc.h
index e86a8c331ee641cfe574a08fe3280213583ca028..9cb68e9b377e2c831f71187dc1314643b83fc933 100644 (file)
@@ -13,7 +13,6 @@
  * Copyright (C) 2000, Goutham Rao <goutham.rao@intel.com>
  */
 
-#include <linux/config.h>
 
 #include <linux/compiler.h>
 #include <linux/mm.h>
@@ -29,7 +28,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 +48,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 +85,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)
 {