diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
commit | 7f0ef0267e20d62d45d527911a993b1e998f4968 (patch) | |
tree | de51abc7da5903f59d83e23937f22420164c9477 /arch/openrisc | |
parent | 862f0012549110d6f2586bf54b52ed4540cbff3a (diff) | |
parent | 9307c29524502c21f0e8a6d96d850b2f5bc0bd9a (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/openrisc')
-rw-r--r-- | arch/openrisc/mm/init.c | 48 |
1 files changed, 6 insertions, 42 deletions
diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c index b3cbc6703837..7f94652311d7 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c | |||
@@ -202,56 +202,20 @@ void __init paging_init(void) | |||
202 | 202 | ||
203 | /* References to section boundaries */ | 203 | /* References to section boundaries */ |
204 | 204 | ||
205 | static int __init free_pages_init(void) | ||
206 | { | ||
207 | int reservedpages, pfn; | ||
208 | |||
209 | /* this will put all low memory onto the freelists */ | ||
210 | totalram_pages = free_all_bootmem(); | ||
211 | |||
212 | reservedpages = 0; | ||
213 | for (pfn = 0; pfn < max_low_pfn; pfn++) { | ||
214 | /* | ||
215 | * Only count reserved RAM pages | ||
216 | */ | ||
217 | if (PageReserved(mem_map + pfn)) | ||
218 | reservedpages++; | ||
219 | } | ||
220 | |||
221 | return reservedpages; | ||
222 | } | ||
223 | |||
224 | static void __init set_max_mapnr_init(void) | ||
225 | { | ||
226 | max_mapnr = num_physpages = max_low_pfn; | ||
227 | } | ||
228 | |||
229 | void __init mem_init(void) | 205 | void __init mem_init(void) |
230 | { | 206 | { |
231 | int codesize, reservedpages, datasize, initsize; | ||
232 | |||
233 | BUG_ON(!mem_map); | 207 | BUG_ON(!mem_map); |
234 | 208 | ||
235 | set_max_mapnr_init(); | 209 | max_mapnr = max_low_pfn; |
236 | |||
237 | high_memory = (void *)__va(max_low_pfn * PAGE_SIZE); | 210 | high_memory = (void *)__va(max_low_pfn * PAGE_SIZE); |
238 | 211 | ||
239 | /* clear the zero-page */ | 212 | /* clear the zero-page */ |
240 | memset((void *)empty_zero_page, 0, PAGE_SIZE); | 213 | memset((void *)empty_zero_page, 0, PAGE_SIZE); |
241 | 214 | ||
242 | reservedpages = free_pages_init(); | 215 | /* this will put all low memory onto the freelists */ |
243 | 216 | free_all_bootmem(); | |
244 | codesize = (unsigned long)&_etext - (unsigned long)&_stext; | ||
245 | datasize = (unsigned long)&_edata - (unsigned long)&_etext; | ||
246 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; | ||
247 | 217 | ||
248 | printk(KERN_INFO | 218 | mem_init_print_info(NULL); |
249 | "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n", | ||
250 | (unsigned long)nr_free_pages() << (PAGE_SHIFT - 10), | ||
251 | max_mapnr << (PAGE_SHIFT - 10), codesize >> 10, | ||
252 | reservedpages << (PAGE_SHIFT - 10), datasize >> 10, | ||
253 | initsize >> 10, (unsigned long)(0 << (PAGE_SHIFT - 10)) | ||
254 | ); | ||
255 | 219 | ||
256 | printk("mem_init_done ...........................................\n"); | 220 | printk("mem_init_done ...........................................\n"); |
257 | mem_init_done = 1; | 221 | mem_init_done = 1; |
@@ -261,11 +225,11 @@ void __init mem_init(void) | |||
261 | #ifdef CONFIG_BLK_DEV_INITRD | 225 | #ifdef CONFIG_BLK_DEV_INITRD |
262 | void free_initrd_mem(unsigned long start, unsigned long end) | 226 | void free_initrd_mem(unsigned long start, unsigned long end) |
263 | { | 227 | { |
264 | free_reserved_area(start, end, 0, "initrd"); | 228 | free_reserved_area((void *)start, (void *)end, -1, "initrd"); |
265 | } | 229 | } |
266 | #endif | 230 | #endif |
267 | 231 | ||
268 | void free_initmem(void) | 232 | void free_initmem(void) |
269 | { | 233 | { |
270 | free_initmem_default(0); | 234 | free_initmem_default(-1); |
271 | } | 235 | } |