summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-01-07 15:19:56 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-01-11 13:04:57 +0900
commit2f5998610ae315fa659ebe2ae0f1c02203b63d9a (patch)
tree0f37ebec4e09f151c8e3a3ee1da04475ee5ab6e0 /arch/sh
parente54be894eae10eca9892e965cc9532f5d5a11767 (diff)
downloadop-kernel-dev-2f5998610ae315fa659ebe2ae0f1c02203b63d9a.zip
op-kernel-dev-2f5998610ae315fa659ebe2ae0f1c02203b63d9a.tar.gz
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.h1
-rw-r--r--arch/sh/mm/init.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
index dd5d6e5..57c5c3d 100644
--- a/arch/sh/include/asm/machvec.h
+++ b/arch/sh/include/asm/machvec.h
@@ -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;
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 3385b28..0d3f912 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -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();
OpenPOWER on IntegriCloud