aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mm/init.c')
-rw-r--r--arch/blackfin/mm/init.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index 78daae084915..9cb85537bd2b 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -48,7 +48,7 @@ void __init paging_init(void)
48 48
49 unsigned long zones_size[MAX_NR_ZONES] = { 49 unsigned long zones_size[MAX_NR_ZONES] = {
50 [0] = 0, 50 [0] = 0,
51 [ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT, 51 [ZONE_DMA] = (end_mem - CONFIG_PHY_RAM_BASE_ADDRESS) >> PAGE_SHIFT,
52 [ZONE_NORMAL] = 0, 52 [ZONE_NORMAL] = 0,
53#ifdef CONFIG_HIGHMEM 53#ifdef CONFIG_HIGHMEM
54 [ZONE_HIGHMEM] = 0, 54 [ZONE_HIGHMEM] = 0,
@@ -60,7 +60,8 @@ void __init paging_init(void)
60 60
61 pr_debug("free_area_init -> start_mem is %#lx virtual_end is %#lx\n", 61 pr_debug("free_area_init -> start_mem is %#lx virtual_end is %#lx\n",
62 PAGE_ALIGN(memory_start), end_mem); 62 PAGE_ALIGN(memory_start), end_mem);
63 free_area_init(zones_size); 63 free_area_init_node(0, zones_size,
64 CONFIG_PHY_RAM_BASE_ADDRESS >> PAGE_SHIFT, NULL);
64} 65}
65 66
66asmlinkage void __init init_pda(void) 67asmlinkage void __init init_pda(void)
@@ -75,9 +76,6 @@ asmlinkage void __init init_pda(void)
75 valid pointers to it. */ 76 valid pointers to it. */
76 memset(&cpu_pda[cpu], 0, sizeof(cpu_pda[cpu])); 77 memset(&cpu_pda[cpu], 0, sizeof(cpu_pda[cpu]));
77 78
78 cpu_pda[0].next = &cpu_pda[1];
79 cpu_pda[1].next = &cpu_pda[0];
80
81#ifdef CONFIG_EXCEPTION_L1_SCRATCH 79#ifdef CONFIG_EXCEPTION_L1_SCRATCH
82 cpu_pda[cpu].ex_stack = (unsigned long *)(L1_SCRATCH_START + \ 80 cpu_pda[cpu].ex_stack = (unsigned long *)(L1_SCRATCH_START + \
83 L1_SCRATCH_LENGTH); 81 L1_SCRATCH_LENGTH);
@@ -109,10 +107,10 @@ void __init mem_init(void)
109 totalram_pages = free_all_bootmem(); 107 totalram_pages = free_all_bootmem();
110 108
111 reservedpages = 0; 109 reservedpages = 0;
112 for (tmp = 0; tmp < max_mapnr; tmp++) 110 for (tmp = ARCH_PFN_OFFSET; tmp < max_mapnr; tmp++)
113 if (PageReserved(pfn_to_page(tmp))) 111 if (PageReserved(pfn_to_page(tmp)))
114 reservedpages++; 112 reservedpages++;
115 freepages = max_mapnr - reservedpages; 113 freepages = max_mapnr - ARCH_PFN_OFFSET - reservedpages;
116 114
117 /* do not count in kernel image between _rambase and _ramstart */ 115 /* do not count in kernel image between _rambase and _ramstart */
118 reservedpages -= (_ramstart - _rambase) >> PAGE_SHIFT; 116 reservedpages -= (_ramstart - _rambase) >> PAGE_SHIFT;
@@ -127,7 +125,7 @@ void __init mem_init(void)
127 printk(KERN_INFO 125 printk(KERN_INFO
128 "Memory available: %luk/%luk RAM, " 126 "Memory available: %luk/%luk RAM, "
129 "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", 127 "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n",
130 (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, 128 (unsigned long) freepages << (PAGE_SHIFT-10), (_ramend - CONFIG_PHY_RAM_BASE_ADDRESS) >> 10,
131 initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); 129 initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10)));
132} 130}
133 131