Commit 2f5998610ae315fa659ebe2ae0f1c02203b63d9a
1 parent
e54be894ea
Exists in
master
and in
7 other branches
sh: Add a machvec callback for early memblock reservations.
This adds in a callback to the machvec to allow platforms to do early reservations through memblock. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 2 changed files with 9 additions and 2 deletions Side-by-side Diff
arch/sh/include/asm/machvec.h
arch/sh/mm/init.c
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | * linux/arch/sh/mm/init.c |
3 | 3 | * |
4 | 4 | * Copyright (C) 1999 Niibe Yutaka |
5 | - * Copyright (C) 2002 - 2010 Paul Mundt | |
5 | + * Copyright (C) 2002 - 2011 Paul Mundt | |
6 | 6 | * |
7 | 7 | * Based on linux/arch/i386/mm/init.c: |
8 | 8 | * Copyright (C) 1995 Linus Torvalds |
9 | 9 | |
... | ... | @@ -325,10 +325,16 @@ |
325 | 325 | int nid; |
326 | 326 | |
327 | 327 | memblock_init(); |
328 | - | |
329 | 328 | sh_mv.mv_mem_init(); |
330 | 329 | |
331 | 330 | early_reserve_mem(); |
331 | + | |
332 | + /* | |
333 | + * Once the early reservations are out of the way, give the | |
334 | + * platforms a chance to kick out some memory. | |
335 | + */ | |
336 | + if (sh_mv.mv_mem_reserve) | |
337 | + sh_mv.mv_mem_reserve(); | |
332 | 338 | |
333 | 339 | memblock_enforce_memory_limit(memory_limit); |
334 | 340 | memblock_analyze(); |