diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 01:21:03 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 01:21:03 -0400 |
commit | 8fc40238b4ebf07cd11ca9707843338be22af72f (patch) | |
tree | 527e9cc7613e8c5839996f694cd2eb6426623a65 /arch/sh/mm | |
parent | 62fad39be0662a924b60e4354b802525ceda0bb1 (diff) |
sh: Prefer slab_is_available() over after_bootmem.
This kills off after_bootmem and switches to using slab_is_available()
instead. Presently the only place this is used is by the sh64 ioremap,
and there's not much point in keeping the reference around otherwise.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/init.c | 3 | ||||
-rw-r--r-- | arch/sh/mm/ioremap_64.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 3edf297c829b..ee8e6bbe882c 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -184,7 +184,6 @@ void __init paging_init(void) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | static struct kcore_list kcore_mem, kcore_vmalloc; | 186 | static struct kcore_list kcore_mem, kcore_vmalloc; |
187 | int after_bootmem = 0; | ||
188 | 187 | ||
189 | void __init mem_init(void) | 188 | void __init mem_init(void) |
190 | { | 189 | { |
@@ -217,8 +216,6 @@ void __init mem_init(void) | |||
217 | memset(empty_zero_page, 0, PAGE_SIZE); | 216 | memset(empty_zero_page, 0, PAGE_SIZE); |
218 | __flush_wback_region(empty_zero_page, PAGE_SIZE); | 217 | __flush_wback_region(empty_zero_page, PAGE_SIZE); |
219 | 218 | ||
220 | after_bootmem = 1; | ||
221 | |||
222 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | 219 | codesize = (unsigned long) &_etext - (unsigned long) &_text; |
223 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; | 220 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; |
224 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | 221 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; |
diff --git a/arch/sh/mm/ioremap_64.c b/arch/sh/mm/ioremap_64.c index 2331229f8126..828c8597219d 100644 --- a/arch/sh/mm/ioremap_64.c +++ b/arch/sh/mm/ioremap_64.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/bootmem.h> | 21 | #include <linux/bootmem.h> |
22 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/pgalloc.h> | 25 | #include <asm/pgalloc.h> |
25 | #include <asm/addrspace.h> | 26 | #include <asm/addrspace.h> |
@@ -175,7 +176,7 @@ static __init_refok void *sh64_get_page(void) | |||
175 | { | 176 | { |
176 | void *page; | 177 | void *page; |
177 | 178 | ||
178 | if (after_bootmem) | 179 | if (slab_is_available()) |
179 | page = (void *)get_zeroed_page(GFP_KERNEL); | 180 | page = (void *)get_zeroed_page(GFP_KERNEL); |
180 | else | 181 | else |
181 | page = alloc_bootmem_pages(PAGE_SIZE); | 182 | page = alloc_bootmem_pages(PAGE_SIZE); |