X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ia64%2Fpgalloc.h;h=fda0dba0b1871dae65d8ab0dbd8c143fbdee64f7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=973316828f028fe1cfa009129a639e5ccca94fa4;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index 973316828..fda0dba0b 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h @@ -61,9 +61,7 @@ pgd_alloc (struct mm_struct *mm) pgd_t *pgd = pgd_alloc_one_fast(mm); if (unlikely(pgd == NULL)) { - pgd = (pgd_t *)__get_free_page(GFP_KERNEL); - if (likely(pgd != NULL)) - clear_page(pgd); + pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); } return pgd; } @@ -79,12 +77,11 @@ pgd_free (pgd_t *pgd) } static inline void -pgd_populate (struct mm_struct *mm, pgd_t *pgd_entry, pmd_t *pmd) +pud_populate (struct mm_struct *mm, pud_t *pud_entry, pmd_t *pmd) { - pgd_val(*pgd_entry) = __pa(pmd); + pud_val(*pud_entry) = __pa(pmd); } - static inline pmd_t* pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr) { @@ -107,10 +104,8 @@ pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr) static inline pmd_t* pmd_alloc_one (struct mm_struct *mm, unsigned long addr) { - pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); - if (likely(pmd != NULL)) - clear_page(pmd); return pmd; } @@ -141,20 +136,16 @@ pmd_populate_kernel (struct mm_struct *mm, pmd_t *pmd_entry, pte_t *pte) static inline struct page * pte_alloc_one (struct mm_struct *mm, unsigned long addr) { - struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); + struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); - if (likely(pte != NULL)) - clear_page(page_address(pte)); return pte; } static inline pte_t * pte_alloc_one_kernel (struct mm_struct *mm, unsigned long addr) { - pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); - if (likely(pte != NULL)) - clear_page(pte); return pte; }