[PATCH 08/11] x86/xip: in setup_arch(), handle resource physical addr
From: Jim Kukunas
Date: Mon Mar 23 2015 - 03:56:27 EST
set code_resources to proper physical addr in setup_arch()
Signed-off-by: Jim Kukunas <james.t.kukunas@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/setup.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 74fc6c8..f044453 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -986,9 +986,16 @@ void __init setup_arch(char **cmdline_p)
mpx_mm_init(&init_mm);
+#ifndef CONFIG_XIP_KERNEL
code_resource.start = __pa_symbol(_text);
code_resource.end = __pa_symbol(_etext)-1;
+ data_resource.start = _pa(_sdata)-1;
+#else
+ code_resource.start = CONFIG_XIP_BASE;
+ code_resource.end = (phys_addr_t)phys_sdata-1;
data_resource.start = __pa_symbol(_etext);
+#endif
+
data_resource.end = __pa_symbol(_edata)-1;
bss_resource.start = __pa_symbol(__bss_start);
bss_resource.end = __pa_symbol(__bss_stop)-1;
--
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/