[ARM] 5133/2: at91sam9g20 defconfig file
[safe/jmp/linux-2.6] / arch / sparc / mm / sun4c.c
index 0729305..2375fe9 100644 (file)
@@ -1941,18 +1941,21 @@ static pte_t *sun4c_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add
        if ((pte = sun4c_pte_alloc_one_fast(mm, address)) != NULL)
                return pte;
 
-       pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-       if (pte)
-               memset(pte, 0, PAGE_SIZE);
+       pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
        return pte;
 }
 
-static struct page *sun4c_pte_alloc_one(struct mm_struct *mm, unsigned long address)
+static pgtable_t sun4c_pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-       pte_t *pte = sun4c_pte_alloc_one_kernel(mm, address);
+       pte_t *pte;
+       struct page *page;
+
+       pte = sun4c_pte_alloc_one_kernel(mm, address);
        if (pte == NULL)
                return NULL;
-       return virt_to_page(pte);
+       page = virt_to_page(pte);
+       pgtable_page_ctor(page);
+       return page;
 }
 
 static inline void sun4c_free_pte_fast(pte_t *pte)
@@ -1962,8 +1965,9 @@ static inline void sun4c_free_pte_fast(pte_t *pte)
        pgtable_cache_size++;
 }
 
-static void sun4c_pte_free(struct page *pte)
+static void sun4c_pte_free(pgtable_t pte)
 {
+       pgtable_page_dtor(pte);
        sun4c_free_pte_fast(page_address(pte));
 }