From f6ef8b7a43ed7f68a4bb524faad5e4f75ea3e3e2 Mon Sep 17 00:00:00 2001
From: Becky Bruce <beckyb@kernel.crashing.org>
Date: Tue, 31 Mar 2009 18:38:37 -0500
Subject: [PATCH] mpc8641hpcn/sbc8641d: Add missing board_lmb_reserves

We're missing the board_lmb_reserve definitions that allow
cpu_mp_lmb_reserve to be called; this means that Linux
is free to reallocate reserved pages.  Linux currently boots
because we're getting lucky - the page we've reserved is
high enough in memory that it isn't allocated by Linux
while we still need it to be in existence.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 board/freescale/mpc8641hpcn/mpc8641hpcn.c | 9 +++++++++
 board/sbc8641d/sbc8641d.c                 | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index c94fc3f1d9c..1e35dfa7c46 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -374,3 +374,12 @@ void board_reset(void)
 	while (1)
 		;
 }
+
+#if (CONFIG_NUM_CPUS > 1)
+extern void cpu_mp_lmb_reserve(struct lmb *lmb);
+
+void board_lmb_reserve(struct lmb *lmb)
+{
+	cpu_mp_lmb_reserve(lmb);
+}
+#endif
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index 52ad2d86c9d..fc1f07dc002 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -413,3 +413,12 @@ void board_reset(void)
 	__asm__ __volatile__ ("rfi");
 #endif
 }
+
+#if (CONFIG_NUM_CPUS > 1)
+extern void cpu_mp_lmb_reserve(struct lmb *lmb);
+
+void board_lmb_reserve(struct lmb *lmb)
+{
+	cpu_mp_lmb_reserve(lmb);
+}
+#endif
-- 
GitLab