diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-12-29 10:43:59 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-06 11:53:09 -0500 |
commit | c44e8d5e47b8ba672440b92eab0735628469116c (patch) | |
tree | f85364a9482003bf51e3cb10d0725ff3f57ce87c | |
parent | 2fa7937bd8922e1fe4aae6a45e7e787fa45d6043 (diff) |
[MIPS] prom_free_prom_memory cleanup
Current prom_free_prom_memory() implementations are almost same as
free_init_pages(), or no-op. Make free_init_pages() extern (again)
and make prom_free_prom_memory() use it.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
31 files changed, 44 insertions, 114 deletions
diff --git a/arch/mips/arc/memory.c b/arch/mips/arc/memory.c index 8a9ef58cc399..456cb81a32d9 100644 --- a/arch/mips/arc/memory.c +++ b/arch/mips/arc/memory.c | |||
@@ -141,30 +141,20 @@ void __init prom_meminit(void) | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | unsigned long __init prom_free_prom_memory(void) | 144 | void __init prom_free_prom_memory(void) |
145 | { | 145 | { |
146 | unsigned long freed = 0; | ||
147 | unsigned long addr; | 146 | unsigned long addr; |
148 | int i; | 147 | int i; |
149 | 148 | ||
150 | if (prom_flags & PROM_FLAG_DONT_FREE_TEMP) | 149 | if (prom_flags & PROM_FLAG_DONT_FREE_TEMP) |
151 | return 0; | 150 | return; |
152 | 151 | ||
153 | for (i = 0; i < boot_mem_map.nr_map; i++) { | 152 | for (i = 0; i < boot_mem_map.nr_map; i++) { |
154 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) | 153 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) |
155 | continue; | 154 | continue; |
156 | 155 | ||
157 | addr = boot_mem_map.map[i].addr; | 156 | addr = boot_mem_map.map[i].addr; |
158 | while (addr < boot_mem_map.map[i].addr | 157 | free_init_pages("prom memory", |
159 | + boot_mem_map.map[i].size) { | 158 | addr, addr + boot_mem_map.map[i].size); |
160 | ClearPageReserved(virt_to_page(__va(addr))); | ||
161 | init_page_count(virt_to_page(__va(addr))); | ||
162 | free_page((unsigned long)__va(addr)); | ||
163 | addr += PAGE_SIZE; | ||
164 | freed += PAGE_SIZE; | ||
165 | } | ||
166 | } | 159 | } |
167 | printk(KERN_INFO "Freeing prom memory: %ldkb freed\n", freed >> 10); | ||
168 | |||
169 | return freed; | ||
170 | } | 160 | } |
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c index 6fce60af005d..a8637cdb5b4b 100644 --- a/arch/mips/au1000/common/prom.c +++ b/arch/mips/au1000/common/prom.c | |||
@@ -149,9 +149,8 @@ int get_ethernet_addr(char *ethernet_addr) | |||
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | unsigned long __init prom_free_prom_memory(void) | 152 | void __init prom_free_prom_memory(void) |
153 | { | 153 | { |
154 | return 0; | ||
155 | } | 154 | } |
156 | 155 | ||
157 | EXPORT_SYMBOL(prom_getcmdline); | 156 | EXPORT_SYMBOL(prom_getcmdline); |
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index e8f0f20b852d..a4b69b543bd9 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c | |||
@@ -204,8 +204,7 @@ void __init prom_init(void) | |||
204 | add_memory_region(0x0, memsz, BOOT_MEM_RAM); | 204 | add_memory_region(0x0, memsz, BOOT_MEM_RAM); |
205 | } | 205 | } |
206 | 206 | ||
207 | unsigned long __init prom_free_prom_memory(void) | 207 | void __init prom_free_prom_memory(void) |
208 | { | 208 | { |
209 | /* Nothing to do! */ | 209 | /* Nothing to do! */ |
210 | return 0; | ||
211 | } | 210 | } |
diff --git a/arch/mips/ddb5xxx/common/prom.c b/arch/mips/ddb5xxx/common/prom.c index efef0f57ce1e..54a857b5e3ba 100644 --- a/arch/mips/ddb5xxx/common/prom.c +++ b/arch/mips/ddb5xxx/common/prom.c | |||
@@ -59,9 +59,8 @@ void __init prom_init(void) | |||
59 | #endif | 59 | #endif |
60 | } | 60 | } |
61 | 61 | ||
62 | unsigned long __init prom_free_prom_memory(void) | 62 | void __init prom_free_prom_memory(void) |
63 | { | 63 | { |
64 | return 0; | ||
65 | } | 64 | } |
66 | 65 | ||
67 | #if defined(CONFIG_DDB5477) | 66 | #if defined(CONFIG_DDB5477) |
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index 3aa01d268f2d..5a557e268f78 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c | |||
@@ -92,9 +92,9 @@ void __init prom_meminit(u32 magic) | |||
92 | rex_setup_memory_region(); | 92 | rex_setup_memory_region(); |
93 | } | 93 | } |
94 | 94 | ||
95 | unsigned long __init prom_free_prom_memory(void) | 95 | void __init prom_free_prom_memory(void) |
96 | { | 96 | { |
97 | unsigned long addr, end; | 97 | unsigned long end; |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Free everything below the kernel itself but leave | 100 | * Free everything below the kernel itself but leave |
@@ -114,16 +114,5 @@ unsigned long __init prom_free_prom_memory(void) | |||
114 | #endif | 114 | #endif |
115 | end = __pa(&_text); | 115 | end = __pa(&_text); |
116 | 116 | ||
117 | addr = PAGE_SIZE; | 117 | free_init_pages("unused PROM memory", PAGE_SIZE, end); |
118 | while (addr < end) { | ||
119 | ClearPageReserved(virt_to_page(__va(addr))); | ||
120 | init_page_count(virt_to_page(__va(addr))); | ||
121 | free_page((unsigned long)__va(addr)); | ||
122 | addr += PAGE_SIZE; | ||
123 | } | ||
124 | |||
125 | printk("Freeing unused PROM memory: %ldkb freed\n", | ||
126 | (end - PAGE_SIZE) >> 10); | ||
127 | |||
128 | return end - PAGE_SIZE; | ||
129 | } | 118 | } |
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c index 99c8d42212e2..477848c22a2c 100644 --- a/arch/mips/gt64120/ev64120/setup.c +++ b/arch/mips/gt64120/ev64120/setup.c | |||
@@ -59,9 +59,8 @@ extern void galileo_machine_power_off(void); | |||
59 | */ | 59 | */ |
60 | extern struct pci_ops galileo_pci_ops; | 60 | extern struct pci_ops galileo_pci_ops; |
61 | 61 | ||
62 | unsigned long __init prom_free_prom_memory(void) | 62 | void __init prom_free_prom_memory(void) |
63 | { | 63 | { |
64 | return 0; | ||
65 | } | 64 | } |
66 | 65 | ||
67 | /* | 66 | /* |
diff --git a/arch/mips/gt64120/momenco_ocelot/prom.c b/arch/mips/gt64120/momenco_ocelot/prom.c index 8677b6d3ada7..78f393b2afd9 100644 --- a/arch/mips/gt64120/momenco_ocelot/prom.c +++ b/arch/mips/gt64120/momenco_ocelot/prom.c | |||
@@ -67,7 +67,6 @@ void __init prom_init(void) | |||
67 | add_memory_region(0, 64 << 20, BOOT_MEM_RAM); | 67 | add_memory_region(0, 64 << 20, BOOT_MEM_RAM); |
68 | } | 68 | } |
69 | 69 | ||
70 | unsigned long __init prom_free_prom_memory(void) | 70 | void __init prom_free_prom_memory(void) |
71 | { | 71 | { |
72 | return 0; | ||
73 | } | 72 | } |
diff --git a/arch/mips/gt64120/wrppmc/setup.c b/arch/mips/gt64120/wrppmc/setup.c index 429afc400cb4..121188d5ec4a 100644 --- a/arch/mips/gt64120/wrppmc/setup.c +++ b/arch/mips/gt64120/wrppmc/setup.c | |||
@@ -93,9 +93,8 @@ void __init wrppmc_early_printk(const char *fmt, ...) | |||
93 | } | 93 | } |
94 | #endif /* WRPPMC_EARLY_DEBUG */ | 94 | #endif /* WRPPMC_EARLY_DEBUG */ |
95 | 95 | ||
96 | unsigned long __init prom_free_prom_memory(void) | 96 | void __init prom_free_prom_memory(void) |
97 | { | 97 | { |
98 | return 0; | ||
99 | } | 98 | } |
100 | 99 | ||
101 | #ifdef CONFIG_SERIAL_8250 | 100 | #ifdef CONFIG_SERIAL_8250 |
diff --git a/arch/mips/jmr3927/common/prom.c b/arch/mips/jmr3927/common/prom.c index 5d5838f41d23..aa481b774c42 100644 --- a/arch/mips/jmr3927/common/prom.c +++ b/arch/mips/jmr3927/common/prom.c | |||
@@ -75,7 +75,6 @@ void __init prom_init_cmdline(void) | |||
75 | *cp = '\0'; | 75 | *cp = '\0'; |
76 | } | 76 | } |
77 | 77 | ||
78 | unsigned long __init prom_free_prom_memory(void) | 78 | void __init prom_free_prom_memory(void) |
79 | { | 79 | { |
80 | return 0; | ||
81 | } | 80 | } |
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c index 88c7ab871ec4..d47692f73a26 100644 --- a/arch/mips/lasat/prom.c +++ b/arch/mips/lasat/prom.c | |||
@@ -132,9 +132,8 @@ void __init prom_init(void) | |||
132 | add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM); | 132 | add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM); |
133 | } | 133 | } |
134 | 134 | ||
135 | unsigned long __init prom_free_prom_memory(void) | 135 | void __init prom_free_prom_memory(void) |
136 | { | 136 | { |
137 | return 0; | ||
138 | } | 137 | } |
139 | 138 | ||
140 | const char *get_system_type(void) | 139 | const char *get_system_type(void) |
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index eeed944e0f83..ebf0e16c5a0d 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -166,9 +166,8 @@ void __init prom_meminit(void) | |||
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | unsigned long __init prom_free_prom_memory(void) | 169 | void __init prom_free_prom_memory(void) |
170 | { | 170 | { |
171 | unsigned long freed = 0; | ||
172 | unsigned long addr; | 171 | unsigned long addr; |
173 | int i; | 172 | int i; |
174 | 173 | ||
@@ -176,17 +175,8 @@ unsigned long __init prom_free_prom_memory(void) | |||
176 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) | 175 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) |
177 | continue; | 176 | continue; |
178 | 177 | ||
179 | addr = PAGE_ALIGN(boot_mem_map.map[i].addr); | 178 | addr = boot_mem_map.map[i].addr; |
180 | while (addr < boot_mem_map.map[i].addr | 179 | free_init_pages("prom memory", |
181 | + boot_mem_map.map[i].size) { | 180 | addr, addr + boot_mem_map.map[i].size); |
182 | ClearPageReserved(virt_to_page(__va(addr))); | ||
183 | init_page_count(virt_to_page(__va(addr))); | ||
184 | free_page((unsigned long)__va(addr)); | ||
185 | addr += PAGE_SIZE; | ||
186 | freed += PAGE_SIZE; | ||
187 | } | ||
188 | } | 181 | } |
189 | printk("Freeing prom memory: %ldkb freed\n", freed >> 10); | ||
190 | |||
191 | return freed; | ||
192 | } | 182 | } |
diff --git a/arch/mips/mips-boards/sim/sim_mem.c b/arch/mips/mips-boards/sim/sim_mem.c index f7ce76983328..46bc16f8b15d 100644 --- a/arch/mips/mips-boards/sim/sim_mem.c +++ b/arch/mips/mips-boards/sim/sim_mem.c | |||
@@ -99,10 +99,9 @@ void __init prom_meminit(void) | |||
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | unsigned long __init prom_free_prom_memory(void) | 102 | void __init prom_free_prom_memory(void) |
103 | { | 103 | { |
104 | int i; | 104 | int i; |
105 | unsigned long freed = 0; | ||
106 | unsigned long addr; | 105 | unsigned long addr; |
107 | 106 | ||
108 | for (i = 0; i < boot_mem_map.nr_map; i++) { | 107 | for (i = 0; i < boot_mem_map.nr_map; i++) { |
@@ -110,16 +109,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
110 | continue; | 109 | continue; |
111 | 110 | ||
112 | addr = boot_mem_map.map[i].addr; | 111 | addr = boot_mem_map.map[i].addr; |
113 | while (addr < boot_mem_map.map[i].addr | 112 | free_init_pages("prom memory", |
114 | + boot_mem_map.map[i].size) { | 113 | addr, addr + boot_mem_map.map[i].size); |
115 | ClearPageReserved(virt_to_page(__va(addr))); | ||
116 | init_page_count(virt_to_page(__va(addr))); | ||
117 | free_page((unsigned long)__va(addr)); | ||
118 | addr += PAGE_SIZE; | ||
119 | freed += PAGE_SIZE; | ||
120 | } | ||
121 | } | 114 | } |
122 | printk("Freeing prom memory: %ldkb freed\n", freed >> 10); | ||
123 | |||
124 | return freed; | ||
125 | } | 115 | } |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 49065c133ebf..fb427dbfe71e 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -467,7 +467,7 @@ void __init mem_init(void) | |||
467 | } | 467 | } |
468 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | 468 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ |
469 | 469 | ||
470 | static void free_init_pages(char *what, unsigned long begin, unsigned long end) | 470 | void free_init_pages(const char *what, unsigned long begin, unsigned long end) |
471 | { | 471 | { |
472 | unsigned long pfn; | 472 | unsigned long pfn; |
473 | 473 | ||
@@ -493,17 +493,9 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
493 | } | 493 | } |
494 | #endif | 494 | #endif |
495 | 495 | ||
496 | extern unsigned long prom_free_prom_memory(void); | ||
497 | |||
498 | void free_initmem(void) | 496 | void free_initmem(void) |
499 | { | 497 | { |
500 | unsigned long freed; | 498 | prom_free_prom_memory(); |
501 | |||
502 | freed = prom_free_prom_memory(); | ||
503 | if (freed) | ||
504 | printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n", | ||
505 | freed >> 10); | ||
506 | |||
507 | free_init_pages("unused kernel memory", | 499 | free_init_pages("unused kernel memory", |
508 | __pa_symbol(&__init_begin), | 500 | __pa_symbol(&__init_begin), |
509 | __pa_symbol(&__init_end)); | 501 | __pa_symbol(&__init_end)); |
diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c index 3d2712929293..66371ffa2196 100644 --- a/arch/mips/momentum/jaguar_atx/prom.c +++ b/arch/mips/momentum/jaguar_atx/prom.c | |||
@@ -235,9 +235,8 @@ void __init prom_init(void) | |||
235 | #endif | 235 | #endif |
236 | } | 236 | } |
237 | 237 | ||
238 | unsigned long __init prom_free_prom_memory(void) | 238 | void __init prom_free_prom_memory(void) |
239 | { | 239 | { |
240 | return 0; | ||
241 | } | 240 | } |
242 | 241 | ||
243 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) | 242 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) |
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c index 6ce9b7fdb824..8e02df63578a 100644 --- a/arch/mips/momentum/ocelot_3/prom.c +++ b/arch/mips/momentum/ocelot_3/prom.c | |||
@@ -180,9 +180,8 @@ void __init prom_init(void) | |||
180 | #endif | 180 | #endif |
181 | } | 181 | } |
182 | 182 | ||
183 | unsigned long __init prom_free_prom_memory(void) | 183 | void __init prom_free_prom_memory(void) |
184 | { | 184 | { |
185 | return 0; | ||
186 | } | 185 | } |
187 | 186 | ||
188 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) | 187 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) |
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c index d0b77e101d74..b689ceea8cfb 100644 --- a/arch/mips/momentum/ocelot_c/prom.c +++ b/arch/mips/momentum/ocelot_c/prom.c | |||
@@ -178,7 +178,6 @@ void __init prom_init(void) | |||
178 | #endif | 178 | #endif |
179 | } | 179 | } |
180 | 180 | ||
181 | unsigned long __init prom_free_prom_memory(void) | 181 | void __init prom_free_prom_memory(void) |
182 | { | 182 | { |
183 | return 0; | ||
184 | } | 183 | } |
diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c index 2f75c6b91ec5..836d0830720d 100644 --- a/arch/mips/momentum/ocelot_g/prom.c +++ b/arch/mips/momentum/ocelot_g/prom.c | |||
@@ -79,7 +79,6 @@ void __init prom_init(void) | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | unsigned long __init prom_free_prom_memory(void) | 82 | void __init prom_free_prom_memory(void) |
83 | { | 83 | { |
84 | return 0; | ||
85 | } | 84 | } |
diff --git a/arch/mips/philips/pnx8550/common/prom.c b/arch/mips/philips/pnx8550/common/prom.c index eb6ec11fef07..8aeed6c2b8c3 100644 --- a/arch/mips/philips/pnx8550/common/prom.c +++ b/arch/mips/philips/pnx8550/common/prom.c | |||
@@ -106,9 +106,8 @@ int get_ethernet_addr(char *ethernet_addr) | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | unsigned long __init prom_free_prom_memory(void) | 109 | void __init prom_free_prom_memory(void) |
110 | { | 110 | { |
111 | return 0; | ||
112 | } | 111 | } |
113 | 112 | ||
114 | extern int pnx8550_console_port; | 113 | extern int pnx8550_console_port; |
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c index 9fe4973377c3..1e1685e415a4 100644 --- a/arch/mips/pmc-sierra/yosemite/prom.c +++ b/arch/mips/pmc-sierra/yosemite/prom.c | |||
@@ -132,9 +132,8 @@ void __init prom_init(void) | |||
132 | prom_grab_secondary(); | 132 | prom_grab_secondary(); |
133 | } | 133 | } |
134 | 134 | ||
135 | unsigned long __init prom_free_prom_memory(void) | 135 | void __init prom_free_prom_memory(void) |
136 | { | 136 | { |
137 | return 0; | ||
138 | } | 137 | } |
139 | 138 | ||
140 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) | 139 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) |
diff --git a/arch/mips/qemu/q-mem.c b/arch/mips/qemu/q-mem.c index d174fac43031..dae39b59de15 100644 --- a/arch/mips/qemu/q-mem.c +++ b/arch/mips/qemu/q-mem.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | 2 | ||
3 | unsigned long __init prom_free_prom_memory(void) | 3 | void __init prom_free_prom_memory(void) |
4 | { | 4 | { |
5 | return 0UL; | ||
6 | } | 5 | } |
diff --git a/arch/mips/sgi-ip22/ip22-mc.c b/arch/mips/sgi-ip22/ip22-mc.c index b58bd522262b..ddb6506d8341 100644 --- a/arch/mips/sgi-ip22/ip22-mc.c +++ b/arch/mips/sgi-ip22/ip22-mc.c | |||
@@ -202,7 +202,6 @@ void __init sgimc_init(void) | |||
202 | } | 202 | } |
203 | 203 | ||
204 | void __init prom_meminit(void) {} | 204 | void __init prom_meminit(void) {} |
205 | unsigned long __init prom_free_prom_memory(void) | 205 | void __init prom_free_prom_memory(void) |
206 | { | 206 | { |
207 | return 0; | ||
208 | } | 207 | } |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index 16e5682b01f1..0e3d535e9f43 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -498,10 +498,9 @@ void __init prom_meminit(void) | |||
498 | } | 498 | } |
499 | } | 499 | } |
500 | 500 | ||
501 | unsigned long __init prom_free_prom_memory(void) | 501 | void __init prom_free_prom_memory(void) |
502 | { | 502 | { |
503 | /* We got nothing to free here ... */ | 503 | /* We got nothing to free here ... */ |
504 | return 0; | ||
505 | } | 504 | } |
506 | 505 | ||
507 | extern void pagetable_init(void); | 506 | extern void pagetable_init(void); |
diff --git a/arch/mips/sgi-ip32/ip32-memory.c b/arch/mips/sgi-ip32/ip32-memory.c index d37d40a3cdae..849d392a0013 100644 --- a/arch/mips/sgi-ip32/ip32-memory.c +++ b/arch/mips/sgi-ip32/ip32-memory.c | |||
@@ -43,7 +43,6 @@ void __init prom_meminit (void) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | 45 | ||
46 | unsigned long __init prom_free_prom_memory (void) | 46 | void __init prom_free_prom_memory(void) |
47 | { | 47 | { |
48 | return 0; | ||
49 | } | 48 | } |
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c index 6e8952da6e2a..9e6099e69622 100644 --- a/arch/mips/sibyte/cfe/setup.c +++ b/arch/mips/sibyte/cfe/setup.c | |||
@@ -343,10 +343,9 @@ void __init prom_init(void) | |||
343 | prom_meminit(); | 343 | prom_meminit(); |
344 | } | 344 | } |
345 | 345 | ||
346 | unsigned long __init prom_free_prom_memory(void) | 346 | void __init prom_free_prom_memory(void) |
347 | { | 347 | { |
348 | /* Not sure what I'm supposed to do here. Nothing, I think */ | 348 | /* Not sure what I'm supposed to do here. Nothing, I think */ |
349 | return 0; | ||
350 | } | 349 | } |
351 | 350 | ||
352 | void prom_putchar(char c) | 351 | void prom_putchar(char c) |
diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c index 3c33a4517bc3..257c4e674353 100644 --- a/arch/mips/sibyte/sb1250/prom.c +++ b/arch/mips/sibyte/sb1250/prom.c | |||
@@ -87,10 +87,9 @@ void __init prom_init(void) | |||
87 | prom_meminit(); | 87 | prom_meminit(); |
88 | } | 88 | } |
89 | 89 | ||
90 | unsigned long __init prom_free_prom_memory(void) | 90 | void __init prom_free_prom_memory(void) |
91 | { | 91 | { |
92 | /* Not sure what I'm supposed to do here. Nothing, I think */ | 92 | /* Not sure what I'm supposed to do here. Nothing, I think */ |
93 | return 0; | ||
94 | } | 93 | } |
95 | 94 | ||
96 | void prom_putchar(char c) | 95 | void prom_putchar(char c) |
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c index d1d0f1f493b4..1213d166f22e 100644 --- a/arch/mips/sni/sniprom.c +++ b/arch/mips/sni/sniprom.c | |||
@@ -67,9 +67,8 @@ void prom_printf(char *fmt, ...) | |||
67 | va_end(args); | 67 | va_end(args); |
68 | } | 68 | } |
69 | 69 | ||
70 | unsigned long prom_free_prom_memory(void) | 70 | void __init prom_free_prom_memory(void) |
71 | { | 71 | { |
72 | return 0; | ||
73 | } | 72 | } |
74 | 73 | ||
75 | /* | 74 | /* |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c index efe50562f0ce..9a3a5babd1fb 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c | |||
@@ -80,9 +80,8 @@ void __init prom_init(void) | |||
80 | add_memory_region(0, msize << 20, BOOT_MEM_RAM); | 80 | add_memory_region(0, msize << 20, BOOT_MEM_RAM); |
81 | } | 81 | } |
82 | 82 | ||
83 | unsigned long __init prom_free_prom_memory(void) | 83 | void __init prom_free_prom_memory(void) |
84 | { | 84 | { |
85 | return 0; | ||
86 | } | 85 | } |
87 | 86 | ||
88 | const char *get_system_type(void) | 87 | const char *get_system_type(void) |
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c index e44daf30a7c1..7dc6a0aae21c 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/prom.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c | |||
@@ -56,9 +56,8 @@ void __init prom_init(void) | |||
56 | return; | 56 | return; |
57 | } | 57 | } |
58 | 58 | ||
59 | unsigned long __init prom_free_prom_memory(void) | 59 | void __init prom_free_prom_memory(void) |
60 | { | 60 | { |
61 | return 0; | ||
62 | } | 61 | } |
63 | 62 | ||
64 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) | 63 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) |
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index a2e285c1d4d5..4f97e0ba9e24 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c | |||
@@ -81,7 +81,6 @@ void __init prom_init(void) | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | unsigned long __init prom_free_prom_memory (void) | 84 | void __init prom_free_prom_memory(void) |
85 | { | 85 | { |
86 | return 0UL; | ||
87 | } | 86 | } |
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 8e321f53a382..c7c945baf1ee 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -243,6 +243,10 @@ extern struct boot_mem_map boot_mem_map; | |||
243 | extern void add_memory_region(phys_t start, phys_t size, long type); | 243 | extern void add_memory_region(phys_t start, phys_t size, long type); |
244 | 244 | ||
245 | extern void prom_init(void); | 245 | extern void prom_init(void); |
246 | extern void prom_free_prom_memory(void); | ||
247 | |||
248 | extern void free_init_pages(const char *what, | ||
249 | unsigned long begin, unsigned long end); | ||
246 | 250 | ||
247 | /* | 251 | /* |
248 | * Initial kernel command line, usually setup by prom_init() | 252 | * Initial kernel command line, usually setup by prom_init() |
diff --git a/include/asm-mips/mips-boards/prom.h b/include/asm-mips/mips-boards/prom.h index 4168c7fcd43e..7bf6f5f6ab9c 100644 --- a/include/asm-mips/mips-boards/prom.h +++ b/include/asm-mips/mips-boards/prom.h | |||
@@ -33,7 +33,6 @@ extern void prom_printf(char *fmt, ...); | |||
33 | extern void prom_init_cmdline(void); | 33 | extern void prom_init_cmdline(void); |
34 | extern void prom_meminit(void); | 34 | extern void prom_meminit(void); |
35 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); | 35 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); |
36 | extern unsigned long prom_free_prom_memory (void); | ||
37 | extern void mips_display_message(const char *str); | 36 | extern void mips_display_message(const char *str); |
38 | extern void mips_display_word(unsigned int num); | 37 | extern void mips_display_word(unsigned int num); |
39 | extern int get_ethernet_addr(char *ethernet_addr); | 38 | extern int get_ethernet_addr(char *ethernet_addr); |