summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-20 00:28:32 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-20 00:28:32 -0700
commit36f6aa1b67f4387ef8d50ad060207df04f007ffd (patch)
tree6cdc5f61b535edbf6252cc56a2c33fe9f61582fd /include
parent68b5a30ff3f3bd193ab1c824b7dc9ed464988a41 (diff)
[PATCH] use __GFP_REPEAT in pmd_alloc_one()
Convert all pmd_alloc_one() implementations to use __GFP_REPEAT
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/pgalloc.h2
-rw-r--r--include/asm-ia64/pgalloc.h2
-rw-r--r--include/asm-m68k/sun3_pgalloc.h2
-rw-r--r--include/asm-mips64/pgalloc.h2
-rw-r--r--include/asm-parisc/pgalloc.h2
-rw-r--r--include/asm-ppc64/pgalloc.h14
-rw-r--r--include/asm-sparc64/pgalloc.h2
-rw-r--r--include/asm-x86_64/pgalloc.h4
8 files changed, 11 insertions, 19 deletions
diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
index fc675efac381..b34194c3d96c 100644
--- a/include/asm-alpha/pgalloc.h
+++ b/include/asm-alpha/pgalloc.h
@@ -40,7 +40,7 @@ pgd_free(pgd_t *pgd)
static inline pmd_t *
pmd_alloc_one(struct mm_struct *mm, unsigned long address)
{
- pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL);
+ pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (ret)
clear_page(ret);
return ret;
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
index 00847acab313..4f56ceb9c42b 100644
--- a/include/asm-ia64/pgalloc.h
+++ b/include/asm-ia64/pgalloc.h
@@ -93,7 +93,7 @@ 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);
+ pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (likely(pmd != NULL))
clear_page(pmd);
diff --git a/include/asm-m68k/sun3_pgalloc.h b/include/asm-m68k/sun3_pgalloc.h
index 3b7f6cc2d38c..4580b60196b9 100644
--- a/include/asm-m68k/sun3_pgalloc.h
+++ b/include/asm-m68k/sun3_pgalloc.h
@@ -18,7 +18,7 @@
extern const char bad_pmd_string[];
-#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
+#define lpmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
static inline void pte_free_kernel(pte_t * pte)
diff --git a/include/asm-mips64/pgalloc.h b/include/asm-mips64/pgalloc.h
index a3113072d611..2b777eebcc31 100644
--- a/include/asm-mips64/pgalloc.h
+++ b/include/asm-mips64/pgalloc.h
@@ -141,7 +141,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
{
pmd_t *pmd;
- pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, 1);
+ pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, 1);
if (pmd)
pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
return pmd;
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
index 14c8605f46a5..bbc02cb134b7 100644
--- a/include/asm-parisc/pgalloc.h
+++ b/include/asm-parisc/pgalloc.h
@@ -35,7 +35,7 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd)
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
{
- pmd_t *pmd = (pmd_t *) __get_free_page(GFP_KERNEL);
+ pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (pmd)
clear_page(pmd);
return pmd;
diff --git a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h
index 40361c23d924..9376b791bee7 100644
--- a/include/asm-ppc64/pgalloc.h
+++ b/include/asm-ppc64/pgalloc.h
@@ -31,19 +31,11 @@ pgd_free(pgd_t *pgd)
static inline pmd_t *
pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
{
- int count = 0;
pmd_t *pmd;
- do {
- pmd = (pmd_t *)__get_free_page(GFP_KERNEL);
- if (pmd)
- clear_page(pmd);
- else {
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
- }
- } while (!pmd && (count++ < 10));
-
+ pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+ if (pmd)
+ clear_page(pmd);
return pmd;
}
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 037c09b1a737..d3c3a7060664 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -159,7 +159,7 @@ static __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addre
pmd = pmd_alloc_one_fast(mm, address);
if (!pmd) {
- pmd = (pmd_t *)__get_free_page(GFP_KERNEL);
+ pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (pmd)
memset(pmd, 0, PAGE_SIZE);
}
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h
index 65b817702a16..e15895c99a4e 100644
--- a/include/asm-x86_64/pgalloc.h
+++ b/include/asm-x86_64/pgalloc.h
@@ -31,12 +31,12 @@ extern __inline__ void pmd_free(pmd_t *pmd)
static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
{
- return (pmd_t *) get_zeroed_page(GFP_KERNEL);
+ return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
}
static inline pgd_t *pgd_alloc (struct mm_struct *mm)
{
- return (pgd_t *)get_zeroed_page(GFP_KERNEL);
+ return (pgd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
}
static inline void pgd_free (pgd_t *pgd)