aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
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/arc
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/arc')
-rw-r--r--arch/arc/mm/init.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 4a177365b2c4..a08ce7185423 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -74,7 +74,7 @@ void __init setup_arch_memory(void)
74 /* Last usable page of low mem (no HIGHMEM yet for ARC port) */ 74 /* Last usable page of low mem (no HIGHMEM yet for ARC port) */
75 max_low_pfn = max_pfn = PFN_DOWN(end_mem); 75 max_low_pfn = max_pfn = PFN_DOWN(end_mem);
76 76
77 max_mapnr = num_physpages = max_low_pfn - min_low_pfn; 77 max_mapnr = max_low_pfn - min_low_pfn;
78 78
79 /*------------- reserve kernel image -----------------------*/ 79 /*------------- reserve kernel image -----------------------*/
80 memblock_reserve(CONFIG_LINUX_LINK_BASE, 80 memblock_reserve(CONFIG_LINUX_LINK_BASE,
@@ -84,7 +84,7 @@ void __init setup_arch_memory(void)
84 84
85 /*-------------- node setup --------------------------------*/ 85 /*-------------- node setup --------------------------------*/
86 memset(zones_size, 0, sizeof(zones_size)); 86 memset(zones_size, 0, sizeof(zones_size));
87 zones_size[ZONE_NORMAL] = num_physpages; 87 zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
88 88
89 /* 89 /*
90 * We can't use the helper free_area_init(zones[]) because it uses 90 * We can't use the helper free_area_init(zones[]) because it uses
@@ -106,39 +106,9 @@ void __init setup_arch_memory(void)
106 */ 106 */
107void __init mem_init(void) 107void __init mem_init(void)
108{ 108{
109 int codesize, datasize, initsize, reserved_pages, free_pages;
110 int tmp;
111
112 high_memory = (void *)(CONFIG_LINUX_LINK_BASE + arc_mem_sz); 109 high_memory = (void *)(CONFIG_LINUX_LINK_BASE + arc_mem_sz);
113 110 free_all_bootmem();
114 totalram_pages = free_all_bootmem(); 111 mem_init_print_info(NULL);
115
116 /* count all reserved pages [kernel code/data/mem_map..] */
117 reserved_pages = 0;
118 for (tmp = 0; tmp < max_mapnr; tmp++)
119 if (PageReserved(mem_map + tmp))
120 reserved_pages++;
121
122 /* XXX: nr_free_pages() is equivalent */
123 free_pages = max_mapnr - reserved_pages;
124
125 /*
126 * For the purpose of display below, split the "reserve mem"
127 * kernel code/data is already shown explicitly,
128 * Show any other reservations (mem_map[ ] et al)
129 */
130 reserved_pages -= (((unsigned int)_end - CONFIG_LINUX_LINK_BASE) >>
131 PAGE_SHIFT);
132
133 codesize = _etext - _text;
134 datasize = _end - _etext;
135 initsize = __init_end - __init_begin;
136
137 pr_info("Memory Available: %dM / %ldM (%dK code, %dK data, %dK init, %dK reserv)\n",
138 PAGES_TO_MB(free_pages),
139 TO_MB(arc_mem_sz),
140 TO_KB(codesize), TO_KB(datasize), TO_KB(initsize),
141 PAGES_TO_KB(reserved_pages));
142} 112}
143 113
144/* 114/*
@@ -146,13 +116,13 @@ void __init mem_init(void)
146 */ 116 */
147void __init_refok free_initmem(void) 117void __init_refok free_initmem(void)
148{ 118{
149 free_initmem_default(0); 119 free_initmem_default(-1);
150} 120}
151 121
152#ifdef CONFIG_BLK_DEV_INITRD 122#ifdef CONFIG_BLK_DEV_INITRD
153void __init free_initrd_mem(unsigned long start, unsigned long end) 123void __init free_initrd_mem(unsigned long start, unsigned long end)
154{ 124{
155 free_reserved_area(start, end, 0, "initrd"); 125 free_reserved_area((void *)start, (void *)end, -1, "initrd");
156} 126}
157#endif 127#endif
158 128