aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-05-07 19:18:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 21:38:26 -0400
commit70affe4520c6f22f5b22b58b589c6ebbe3f8cbc9 (patch)
treea5d791be3fa2b58e9c527c9a1e0e0cfa2a94663f /arch/sparc/kernel
parent0f47c9423c0fe468d0b5b153f9b9d6e8e20707eb (diff)
mm/SPARC: use common help functions to free reserved pages
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/leon_smp.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index 9b40c9c12a0c..6cfc1b09ec25 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -253,24 +253,15 @@ void __init leon_smp_done(void)
253 253
254 /* Free unneeded trap tables */ 254 /* Free unneeded trap tables */
255 if (!cpu_present(1)) { 255 if (!cpu_present(1)) {
256 ClearPageReserved(virt_to_page(&trapbase_cpu1)); 256 free_reserved_page(virt_to_page(&trapbase_cpu1));
257 init_page_count(virt_to_page(&trapbase_cpu1));
258 free_page((unsigned long)&trapbase_cpu1);
259 totalram_pages++;
260 num_physpages++; 257 num_physpages++;
261 } 258 }
262 if (!cpu_present(2)) { 259 if (!cpu_present(2)) {
263 ClearPageReserved(virt_to_page(&trapbase_cpu2)); 260 free_reserved_page(virt_to_page(&trapbase_cpu2));
264 init_page_count(virt_to_page(&trapbase_cpu2));
265 free_page((unsigned long)&trapbase_cpu2);
266 totalram_pages++;
267 num_physpages++; 261 num_physpages++;
268 } 262 }
269 if (!cpu_present(3)) { 263 if (!cpu_present(3)) {
270 ClearPageReserved(virt_to_page(&trapbase_cpu3)); 264 free_reserved_page(virt_to_page(&trapbase_cpu3));
271 init_page_count(virt_to_page(&trapbase_cpu3));
272 free_page((unsigned long)&trapbase_cpu3);
273 totalram_pages++;
274 num_physpages++; 265 num_physpages++;
275 } 266 }
276 /* Ok, they are spinning and ready to go. */ 267 /* Ok, they are spinning and ready to go. */