diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-07 01:19:56 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-10 23:04:57 -0500 |
commit | 2f5998610ae315fa659ebe2ae0f1c02203b63d9a (patch) | |
tree | 0f37ebec4e09f151c8e3a3ee1da04475ee5ab6e0 /arch/sh | |
parent | e54be894eae10eca9892e965cc9532f5d5a11767 (diff) |
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>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/machvec.h | 1 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index dd5d6e5bf204..57c5c3d0f39f 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h | |||
@@ -31,6 +31,7 @@ struct sh_machine_vector { | |||
31 | int (*mv_mode_pins)(void); | 31 | int (*mv_mode_pins)(void); |
32 | 32 | ||
33 | void (*mv_mem_init)(void); | 33 | void (*mv_mem_init)(void); |
34 | void (*mv_mem_reserve)(void); | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | extern struct sh_machine_vector sh_mv; | 37 | extern struct sh_machine_vector sh_mv; |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 3385b28acaac..0d3f912e3334 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/sh/mm/init.c | 2 | * linux/arch/sh/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Niibe Yutaka | 4 | * Copyright (C) 1999 Niibe Yutaka |
5 | * Copyright (C) 2002 - 2010 Paul Mundt | 5 | * Copyright (C) 2002 - 2011 Paul Mundt |
6 | * | 6 | * |
7 | * Based on linux/arch/i386/mm/init.c: | 7 | * Based on linux/arch/i386/mm/init.c: |
8 | * Copyright (C) 1995 Linus Torvalds | 8 | * Copyright (C) 1995 Linus Torvalds |
@@ -325,11 +325,17 @@ void __init paging_init(void) | |||
325 | int nid; | 325 | int nid; |
326 | 326 | ||
327 | memblock_init(); | 327 | memblock_init(); |
328 | |||
329 | sh_mv.mv_mem_init(); | 328 | sh_mv.mv_mem_init(); |
330 | 329 | ||
331 | early_reserve_mem(); | 330 | early_reserve_mem(); |
332 | 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(); | ||
338 | |||
333 | memblock_enforce_memory_limit(memory_limit); | 339 | memblock_enforce_memory_limit(memory_limit); |
334 | memblock_analyze(); | 340 | memblock_analyze(); |
335 | 341 | ||