提交 8fc40238 编写于 作者: P Paul Mundt

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: NPaul Mundt <lethal@linux-sh.org>
上级 62fad39b
...@@ -184,7 +184,6 @@ void __init paging_init(void) ...@@ -184,7 +184,6 @@ void __init paging_init(void)
} }
static struct kcore_list kcore_mem, kcore_vmalloc; static struct kcore_list kcore_mem, kcore_vmalloc;
int after_bootmem = 0;
void __init mem_init(void) void __init mem_init(void)
{ {
...@@ -217,8 +216,6 @@ void __init mem_init(void) ...@@ -217,8 +216,6 @@ void __init mem_init(void)
memset(empty_zero_page, 0, PAGE_SIZE); memset(empty_zero_page, 0, PAGE_SIZE);
__flush_wback_region(empty_zero_page, PAGE_SIZE); __flush_wback_region(empty_zero_page, PAGE_SIZE);
after_bootmem = 1;
codesize = (unsigned long) &_etext - (unsigned long) &_text; codesize = (unsigned long) &_etext - (unsigned long) &_text;
datasize = (unsigned long) &_edata - (unsigned long) &_etext; datasize = (unsigned long) &_edata - (unsigned long) &_etext;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/slab.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/addrspace.h> #include <asm/addrspace.h>
...@@ -175,7 +176,7 @@ static __init_refok void *sh64_get_page(void) ...@@ -175,7 +176,7 @@ static __init_refok void *sh64_get_page(void)
{ {
void *page; void *page;
if (after_bootmem) if (slab_is_available())
page = (void *)get_zeroed_page(GFP_KERNEL); page = (void *)get_zeroed_page(GFP_KERNEL);
else else
page = alloc_bootmem_pages(PAGE_SIZE); page = alloc_bootmem_pages(PAGE_SIZE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册