[PATCH 05/11] x86/xip: reserve memblock for only data
From: Jim Kukunas
Date: Mon Mar 23 2015 - 03:55:28 EST
Nothing is loaded at the usual spot for .text, starting at
CONFIG_PHYSICAL_START, so we don't reserve it. Additionally,
the physical address of the _text isn't going to be physically
contiguous with _data.
Signed-off-by: Jim Kukunas <james.t.kukunas@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/setup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 98dc931..e2d85c4 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -869,8 +869,13 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
void __init setup_arch(char **cmdline_p)
{
+#ifdef CONFIG_XIP_KERNEL
+ memblock_reserve(__pa_symbol(_sdata),
+ (unsigned long)__bss_stop - (unsigned long)_sdata);
+#else
memblock_reserve(__pa_symbol(_text),
(unsigned long)__bss_stop - (unsigned long)_text);
+ #endif
early_reserve_initrd();
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/