linux-mips
[Top] [All Lists]

[PATCH] MIPS: Hide initrd code behind the CONFIG_BLK_DEV_INITRD macro

To: <linux-mips@linux-mips.org>
Subject: [PATCH] MIPS: Hide initrd code behind the CONFIG_BLK_DEV_INITRD macro
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Mon, 7 Oct 2013 17:07:49 +0100
Cc: Markos Chandras <markos.chandras@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Commit 5395d97b675986e7e8f3140f9e0819d20b1d22cd
"MIPS: Fix start of free memory when using initrd"

uses the 'initrd_end' symbol even if CONFIG_BLK_DEV_INITRD is
not enabled. This causes linking problems like this:

arch/mips/built-in.o: In function `setup_arch':
(.init.text+0x1b8c): undefined reference to `initrd_end'
arch/mips/built-in.o: In function `setup_arch':
(.init.text+0x1b90): undefined reference to `initrd_end'

We fix this problem by adding the missing CONFIG_BLK_DEV_INITRD
macro

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
The build problem is currently reproducible on linux-next and
upstream-sfr/mips-for-linux-next so this patch needs to be
applied to that tree.
---
 arch/mips/kernel/setup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index dfb8585..9d5d31d 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -363,10 +363,12 @@ static void __init bootmem_init(void)
                max_low_pfn = PFN_DOWN(HIGHMEM_START);
        }
 
+#ifdef CONFIG_BLK_DEV_INITRD
        /*
         * mapstart should be after initrd_end
         */
        mapstart = max(mapstart, (unsigned long)PFN_UP(__pa(initrd_end)));
+#endif
 
        /*
         * Initialize the boot-time allocator with low memory only.
-- 
1.8.3.2



<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: Hide initrd code behind the CONFIG_BLK_DEV_INITRD macro, Markos Chandras <=