aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 20:12:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 20:12:13 -0400
commit7f0ef0267e20d62d45d527911a993b1e998f4968 (patch)
treede51abc7da5903f59d83e23937f22420164c9477 /arch/m68k
parent862f0012549110d6f2586bf54b52ed4540cbff3a (diff)
parent9307c29524502c21f0e8a6d96d850b2f5bc0bd9a (diff)
Merge branch 'akpm' (updates from Andrew Morton)
Merge first patch-bomb from Andrew Morton: - various misc bits - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been distracted. There has been quite a bit of activity. - About half the MM queue - Some backlight bits - Various lib/ updates - checkpatch updates - zillions more little rtc patches - ptrace - signals - exec - procfs - rapidio - nbd - aoe - pps - memstick - tools/testing/selftests updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits) tools/testing/selftests: don't assume the x bit is set on scripts selftests: add .gitignore for kcmp selftests: fix clean target in kcmp Makefile selftests: add .gitignore for vm selftests: add hugetlbfstest self-test: fix make clean selftests: exit 1 on failure kernel/resource.c: remove the unneeded assignment in function __find_resource aio: fix wrong comment in aio_complete() drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode drivers/memstick/host/r592.c: convert to module_pci_driver drivers/memstick/host/jmb38x_ms: convert to module_pci_driver pps-gpio: add device-tree binding and support drivers/pps/clients/pps-gpio.c: convert to module_platform_driver drivers/pps/clients/pps-gpio.c: convert to devm_* helpers drivers/parport/share.c: use kzalloc Documentation/accounting/getdelays.c: avoid strncpy in accounting tool aoe: update internal version number to v83 aoe: update copyright date aoe: perform I/O completions in parallel ...
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mm/init.c48
1 files changed, 11 insertions, 37 deletions
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index 1af2ca3411f6..6b4baa6e4d31 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -110,7 +110,7 @@ void __init paging_init(void)
110void free_initmem(void) 110void free_initmem(void)
111{ 111{
112#ifndef CONFIG_MMU_SUN3 112#ifndef CONFIG_MMU_SUN3
113 free_initmem_default(0); 113 free_initmem_default(-1);
114#endif /* CONFIG_MMU_SUN3 */ 114#endif /* CONFIG_MMU_SUN3 */
115} 115}
116 116
@@ -146,38 +146,11 @@ void __init print_memmap(void)
146 MLK_ROUNDUP(__bss_start, __bss_stop)); 146 MLK_ROUNDUP(__bss_start, __bss_stop));
147} 147}
148 148
149void __init mem_init(void) 149static inline void init_pointer_tables(void)
150{ 150{
151 pg_data_t *pgdat; 151#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
152 int codepages = 0;
153 int datapages = 0;
154 int initpages = 0;
155 int i; 152 int i;
156 153
157 /* this will put all memory onto the freelists */
158 totalram_pages = num_physpages = 0;
159 for_each_online_pgdat(pgdat) {
160 num_physpages += pgdat->node_present_pages;
161
162 totalram_pages += free_all_bootmem_node(pgdat);
163 for (i = 0; i < pgdat->node_spanned_pages; i++) {
164 struct page *page = pgdat->node_mem_map + i;
165 char *addr = page_to_virt(page);
166
167 if (!PageReserved(page))
168 continue;
169 if (addr >= _text &&
170 addr < _etext)
171 codepages++;
172 else if (addr >= __init_begin &&
173 addr < __init_end)
174 initpages++;
175 else
176 datapages++;
177 }
178 }
179
180#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
181 /* insert pointer tables allocated so far into the tablelist */ 154 /* insert pointer tables allocated so far into the tablelist */
182 init_pointer_table((unsigned long)kernel_pg_dir); 155 init_pointer_table((unsigned long)kernel_pg_dir);
183 for (i = 0; i < PTRS_PER_PGD; i++) { 156 for (i = 0; i < PTRS_PER_PGD; i++) {
@@ -189,19 +162,20 @@ void __init mem_init(void)
189 if (zero_pgtable) 162 if (zero_pgtable)
190 init_pointer_table((unsigned long)zero_pgtable); 163 init_pointer_table((unsigned long)zero_pgtable);
191#endif 164#endif
165}
192 166
193 pr_info("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", 167void __init mem_init(void)
194 nr_free_pages() << (PAGE_SHIFT-10), 168{
195 totalram_pages << (PAGE_SHIFT-10), 169 /* this will put all memory onto the freelists */
196 codepages << (PAGE_SHIFT-10), 170 free_all_bootmem();
197 datapages << (PAGE_SHIFT-10), 171 init_pointer_tables();
198 initpages << (PAGE_SHIFT-10)); 172 mem_init_print_info(NULL);
199 print_memmap(); 173 print_memmap();
200} 174}
201 175
202#ifdef CONFIG_BLK_DEV_INITRD 176#ifdef CONFIG_BLK_DEV_INITRD
203void free_initrd_mem(unsigned long start, unsigned long end) 177void free_initrd_mem(unsigned long start, unsigned long end)
204{ 178{
205 free_reserved_area(start, end, 0, "initrd"); 179 free_reserved_area((void *)start, (void *)end, -1, "initrd");
206} 180}
207#endif 181#endif