diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-07 20:38:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-07 20:38:55 -0700 |
| commit | 15e28e8d45273677a31fad76102acc3bc4cf88f6 (patch) | |
| tree | e73d70761b467d4e3e07398c4697623a11956fea /include | |
| parent | 76a0722ffe4c7b7832ec07f9e9de1c6e58c31d74 (diff) | |
[PATCH] remove get_free_page()
This used to be a macro wrapper around get_zeroed_page().
It was a dreadful choice of name, because it hid the fact that this
function memsets the page. Probably, lots of the callers didn't
actually want to do that but this patch does not make such
optimisations.
At least now, people may spot a `get_zeroed_page' in there and realise
that the page doesn't actually need to be initialised.
The patch also changes get_zeroed_page() to go BUG if called with
__GFP_HIGHMEM. It returns the address of the page's memory and hence
can only be used for direct-mapped pages (wli).
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-m68k/sun3_pgalloc.h | 2 | ||||
| -rw-r--r-- | include/asm-s390/debug.h | 2 | ||||
| -rw-r--r-- | include/asm-s390x/debug.h | 2 | ||||
| -rw-r--r-- | include/linux/gfp.h | 5 |
4 files changed, 3 insertions, 8 deletions
diff --git a/include/asm-m68k/sun3_pgalloc.h b/include/asm-m68k/sun3_pgalloc.h index 5229c070c7ff..c30e1b6a50cb 100644 --- a/include/asm-m68k/sun3_pgalloc.h +++ b/include/asm-m68k/sun3_pgalloc.h @@ -87,7 +87,7 @@ static inline pgd_t * pgd_alloc(struct mm_struct *mm) { pgd_t *new_pgd; - new_pgd = (pgd_t *)get_free_page(GFP_KERNEL); + new_pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL); memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE); memset(new_pgd, 0, (PAGE_OFFSET >> PGDIR_SHIFT)); return new_pgd; diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 56a4043a1155..0279123ca320 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h @@ -261,7 +261,7 @@ int debug_unregister_view(debug_info_t* id, struct debug_view* view); void *b; #define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b) #define kfree(x) PRINT_INFO(" kfree %p\n",x);kfree(x) -#define get_free_page(x...) (PRINT_INFO(" gfp %p\n",b=get_free_page(x)),b) +#define get_zeroed_page(x...) (PRINT_INFO(" gfp %p\n",b=get_zeroed_page(x)),b) #define __get_free_pages(x...) (PRINT_INFO(" gfps %p\n",b=__get_free_pages(x)),b) #endif /* DEBUG_MALLOC */ diff --git a/include/asm-s390x/debug.h b/include/asm-s390x/debug.h index 56a4043a1155..0279123ca320 100644 --- a/include/asm-s390x/debug.h +++ b/include/asm-s390x/debug.h @@ -261,7 +261,7 @@ int debug_unregister_view(debug_info_t* id, struct debug_view* view); void *b; #define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b) #define kfree(x) PRINT_INFO(" kfree %p\n",x);kfree(x) -#define get_free_page(x...) (PRINT_INFO(" gfp %p\n",b=get_free_page(x)),b) +#define get_zeroed_page(x...) (PRINT_INFO(" gfp %p\n",b=get_zeroed_page(x)),b) #define __get_free_pages(x...) (PRINT_INFO(" gfps %p\n",b=__get_free_pages(x)),b) #endif /* DEBUG_MALLOC */ diff --git a/include/linux/gfp.h b/include/linux/gfp.h index b186f69b7217..966344dff4b4 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -71,11 +71,6 @@ extern unsigned long FASTCALL(get_zeroed_page(unsigned int gfp_mask)); __get_free_pages((gfp_mask) | GFP_DMA,(order)) /* - * The old interface name will be removed in 2.5: - */ -#define get_free_page get_zeroed_page - -/* * There is only one 'core' page-freeing function. */ extern void FASTCALL(__free_pages(struct page *page, unsigned int order)); |
