aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorSuzuki Poulose <suzuki@in.ibm.com>2011-12-14 17:57:15 -0500
committerJosh Boyer <jwboyer@gmail.com>2011-12-20 10:20:19 -0500
commit0f890c8d205e47f7cb0d381ffba582a170fd4f72 (patch)
tree66d8370622f15636134b83bd19145ce61d8d719c /arch/powerpc/kernel
parent3f53638c805f75989f4b4be07efcfd173cdd5e2d (diff)
powerpc: Rename mapping based RELOCATABLE to DYNAMIC_MEMSTART for BookE
The current implementation of CONFIG_RELOCATABLE in BookE is based on mapping the page aligned kernel load address to KERNELBASE. This approach however is not enough for platforms, where the TLB page size is large (e.g, 256M on 44x). So we are renaming the RELOCATABLE used currently in BookE to DYNAMIC_MEMSTART to reflect the actual method. The CONFIG_RELOCATABLE for PPC32(BookE) based on processing of the dynamic relocations will be introduced in the later in the patch series. This change would allow the use of the old method of RELOCATABLE for platforms which can afford to enforce the page alignment (platforms with smaller TLB size). Changes since v3: * Introduced a new config, NONSTATIC_KERNEL, to denote a kernel which is either a RELOCATABLE or DYNAMIC_MEMSTART(Suggested by: Josh Boyer) Suggested-by: Scott Wood <scottwood@freescale.com> Tested-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Josh Boyer <jwboyer@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linux ppc dev <linuxppc-dev@lists.ozlabs.org> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/crash_dump.c4
-rw-r--r--arch/powerpc/kernel/head_44x.S4
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S2
-rw-r--r--arch/powerpc/kernel/machine_kexec.c2
-rw-r--r--arch/powerpc/kernel/prom_init.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 424afb6b8fba..b3ba5163eae2 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -28,7 +28,7 @@
28#define DBG(fmt...) 28#define DBG(fmt...)
29#endif 29#endif
30 30
31#ifndef CONFIG_RELOCATABLE 31#ifndef CONFIG_NONSTATIC_KERNEL
32void __init reserve_kdump_trampoline(void) 32void __init reserve_kdump_trampoline(void)
33{ 33{
34 memblock_reserve(0, KDUMP_RESERVE_LIMIT); 34 memblock_reserve(0, KDUMP_RESERVE_LIMIT);
@@ -67,7 +67,7 @@ void __init setup_kdump_trampoline(void)
67 67
68 DBG(" <- setup_kdump_trampoline()\n"); 68 DBG(" <- setup_kdump_trampoline()\n");
69} 69}
70#endif /* CONFIG_RELOCATABLE */ 70#endif /* CONFIG_NONSTATIC_KERNEL */
71 71
72static int __init parse_savemaxmem(char *p) 72static int __init parse_savemaxmem(char *p)
73{ 73{
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index bb7a9c7a4c05..d7a1debda10b 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -86,8 +86,10 @@ _ENTRY(_start);
86 86
87 bl early_init 87 bl early_init
88 88
89#ifdef CONFIG_RELOCATABLE 89#ifdef CONFIG_DYNAMIC_MEMSTART
90 /* 90 /*
91 * Mapping based, page aligned dynamic kernel loading.
92 *
91 * r25 will contain RPN/ERPN for the start address of memory 93 * r25 will contain RPN/ERPN for the start address of memory
92 * 94 *
93 * Add the difference between KERNELBASE and PAGE_OFFSET to the 95 * Add the difference between KERNELBASE and PAGE_OFFSET to the
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 9f5d210ddf3f..d5d78c4ceef6 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -197,7 +197,7 @@ _ENTRY(__early_start)
197 197
198 bl early_init 198 bl early_init
199 199
200#ifdef CONFIG_RELOCATABLE 200#ifdef CONFIG_DYNAMIC_MEMSTART
201 lis r3,kernstart_addr@ha 201 lis r3,kernstart_addr@ha
202 la r3,kernstart_addr@l(r3) 202 la r3,kernstart_addr@l(r3)
203#ifdef CONFIG_PHYS_64BIT 203#ifdef CONFIG_PHYS_64BIT
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index 9ce1672afb59..ec50bb965538 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -128,7 +128,7 @@ void __init reserve_crashkernel(void)
128 128
129 crash_size = resource_size(&crashk_res); 129 crash_size = resource_size(&crashk_res);
130 130
131#ifndef CONFIG_RELOCATABLE 131#ifndef CONFIG_NONSTATIC_KERNEL
132 if (crashk_res.start != KDUMP_KERNELBASE) 132 if (crashk_res.start != KDUMP_KERNELBASE)
133 printk("Crash kernel location must be 0x%x\n", 133 printk("Crash kernel location must be 0x%x\n",
134 KDUMP_KERNELBASE); 134 KDUMP_KERNELBASE);
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 55b4080a821e..eca626ea3f23 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2845,7 +2845,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2845 RELOC(of_platform) = prom_find_machine_type(); 2845 RELOC(of_platform) = prom_find_machine_type();
2846 prom_printf("Detected machine type: %x\n", RELOC(of_platform)); 2846 prom_printf("Detected machine type: %x\n", RELOC(of_platform));
2847 2847
2848#ifndef CONFIG_RELOCATABLE 2848#ifndef CONFIG_NONSTATIC_KERNEL
2849 /* Bail if this is a kdump kernel. */ 2849 /* Bail if this is a kdump kernel. */
2850 if (PHYSICAL_START > 0) 2850 if (PHYSICAL_START > 0)
2851 prom_panic("Error: You can't boot a kdump kernel from OF!\n"); 2851 prom_panic("Error: You can't boot a kdump kernel from OF!\n");