From 7144543c7c944e3b4295a88273a5544bb0534a79 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Fri, 3 Aug 2007 13:29:01 +0200 Subject: [PATCH] --- yaml --- r: 64058 b: refs/heads/master c: e7f3bac95e0bdfd520e065c4a29aad46190fcc99 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-avr32/pgalloc.h | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 497fef90eb87..9fb26c8ab4b5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5221b34edfd05ac35c077e071095cf853325320f +refs/heads/master: e7f3bac95e0bdfd520e065c4a29aad46190fcc99 diff --git a/trunk/include/asm-avr32/pgalloc.h b/trunk/include/asm-avr32/pgalloc.h index 75248141c613..0e680f47209f 100644 --- a/trunk/include/asm-avr32/pgalloc.h +++ b/trunk/include/asm-avr32/pgalloc.h @@ -38,18 +38,9 @@ static inline void pgd_free(pgd_t *pgd) static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - int count = 0; pte_t *pte; - do { - pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT); - if (pte) - clear_page(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = (pte_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); return pte; } @@ -57,18 +48,9 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - int count = 0; struct page *pte; - do { - pte = alloc_pages(GFP_KERNEL, 0); - if (pte) - clear_page(page_address(pte)); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); + pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); return pte; }