]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sh: Add a machvec callback for early memblock reservations.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 7 Jan 2011 06:19:56 +0000 (15:19 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 11 Jan 2011 04:04:57 +0000 (13:04 +0900)
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>
arch/sh/include/asm/machvec.h
arch/sh/mm/init.c

index dd5d6e5bf204a74ced7056fe13719abcbe661d59..57c5c3d0f39fe4b1bfdff174b544045a9c8baac8 100644 (file)
@@ -31,6 +31,7 @@ struct sh_machine_vector {
        int (*mv_mode_pins)(void);
 
        void (*mv_mem_init)(void);
+       void (*mv_mem_reserve)(void);
 };
 
 extern struct sh_machine_vector sh_mv;
index 3385b28acaac5f072b8b773c810b6ad5a4e7ae5b..0d3f912e3334b1ecd07e5ec7c34b9ee84326bb56 100644 (file)
@@ -2,7 +2,7 @@
  * linux/arch/sh/mm/init.c
  *
  *  Copyright (C) 1999  Niibe Yutaka
- *  Copyright (C) 2002 - 2010  Paul Mundt
+ *  Copyright (C) 2002 - 2011  Paul Mundt
  *
  *  Based on linux/arch/i386/mm/init.c:
  *   Copyright (C) 1995  Linus Torvalds
@@ -325,11 +325,17 @@ void __init paging_init(void)
        int nid;
 
        memblock_init();
-
        sh_mv.mv_mem_init();
 
        early_reserve_mem();
 
+       /*
+        * Once the early reservations are out of the way, give the
+        * platforms a chance to kick out some memory.
+        */
+       if (sh_mv.mv_mem_reserve)
+               sh_mv.mv_mem_reserve();
+
        memblock_enforce_memory_limit(memory_limit);
        memblock_analyze();