diff options
author | Chen Liqin <liqin.chen@sunplusct.com> | 2009-11-18 13:28:13 +0800 |
---|---|---|
committer | Chen Liqin <liqin.chen@sunplusct.com> | 2009-12-17 18:28:31 +0800 |
commit | 202b864ad5aa34989609a3073acbe7a04795b265 (patch) | |
tree | bfe99f7623102802726f1265e0032673435f04fd | |
parent | 11ab3f3d3c2474d3ed6912443de74c3972bd6f23 (diff) | |
download | linux-3.10-202b864ad5aa34989609a3073acbe7a04795b265.tar.gz linux-3.10-202b864ad5aa34989609a3073acbe7a04795b265.tar.bz2 linux-3.10-202b864ad5aa34989609a3073acbe7a04795b265.zip |
score: fixed pfn_valid define.
Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn>
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
modified: arch/score/include/asm/page.h
modified: arch/score/kernel/setup.c
modified: arch/score/mm/init.c
-rw-r--r-- | arch/score/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/score/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/score/mm/init.c | 5 |
3 files changed, 2 insertions, 6 deletions
diff --git a/arch/score/include/asm/page.h b/arch/score/include/asm/page.h index d92a5a2d36d..1e9ade8e77e 100644 --- a/arch/score/include/asm/page.h +++ b/arch/score/include/asm/page.h @@ -74,7 +74,7 @@ extern unsigned long max_pfn; #define page_to_bus(page) (page_to_phys(page)) #define phys_to_page(paddr) (pfn_to_page(phys_to_pfn(paddr))) -#define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_mapnr) +#define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn)) #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) diff --git a/arch/score/kernel/setup.c b/arch/score/kernel/setup.c index 6a2503c75c4..6f898c05787 100644 --- a/arch/score/kernel/setup.c +++ b/arch/score/kernel/setup.c @@ -49,6 +49,7 @@ static void __init bootmem_init(void) min_low_pfn = PFN_UP(MEMORY_START); max_low_pfn = PFN_UP(MEMORY_START + MEMORY_SIZE); + max_mapnr = max_low_pfn - min_low_pfn; /* Initialize the boot-time allocator with low memory only. */ bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c index 4e3dcd0c471..8c15b2c85d5 100644 --- a/arch/score/mm/init.c +++ b/arch/score/mm/init.c @@ -83,7 +83,6 @@ void __init mem_init(void) unsigned long codesize, reservedpages, datasize, initsize; unsigned long tmp, ram = 0; - max_mapnr = max_low_pfn; high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); totalram_pages += free_all_bootmem(); totalram_pages -= setup_zero_page(); /* Setup zeroed pages. */ @@ -101,10 +100,6 @@ void __init mem_init(void) datasize = (unsigned long) &_edata - (unsigned long) &_etext; initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; - kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT); - kclist_add(&kcore_vmalloc, (void *) VMALLOC_START, - VMALLOC_END - VMALLOC_START); - printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |