On Mon, Nov 14, 2011 at 12:41 AM, Suzuki K. Poulose <suz...@in.ibm.com> wrote: > 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).
I'm OK with the general direction, but this touches a lot of non-4xx code. I'd prefer it if Ben took this directly on whatever final solution is done. > I haven tested this change only on 440x. I don't have an FSL BookE to verify > the changes there. > > Scott, > Could you please test this patch on FSL and let me know the results ? Scott, did you ever get around to testing this? In my opinion, this shouldn't go in without a Tested-by: from someone that tried it on an FSL platform. > Suggested-by: Scott Wood <scottw...@freescale.com> > > Signed-off-by: Suzuki K. Poulose <suz...@in.ibm.com> > Cc: Scott Wood <scottw...@freescale.com> > Cc: Kumar Gala <ga...@kernel.crashing.org> > Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> > Cc: linux ppc dev <linuxppc-dev@lists.ozlabs.org> > --- > > arch/powerpc/Kconfig | 50 > ++++++++++++++++--------- > arch/powerpc/configs/44x/iss476-smp_defconfig | 2 + > arch/powerpc/include/asm/kdump.h | 5 ++- > arch/powerpc/include/asm/page.h | 4 +- > arch/powerpc/kernel/crash_dump.c | 4 +- > arch/powerpc/kernel/head_44x.S | 4 ++ > arch/powerpc/kernel/head_fsl_booke.S | 2 + > arch/powerpc/kernel/machine_kexec.c | 2 + > arch/powerpc/kernel/prom_init.c | 2 + > arch/powerpc/mm/44x_mmu.c | 2 + > 10 files changed, 47 insertions(+), 30 deletions(-) > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index d7c2d1a..8d4f789 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -363,7 +363,8 @@ config KEXEC > config CRASH_DUMP > bool "Build a kdump crash kernel" > depends on PPC64 || 6xx || FSL_BOOKE > - select RELOCATABLE if PPC64 || FSL_BOOKE > + select RELOCATABLE if PPC64 > + select DYNAMIC_MEMSTART if FSL_BOOKE > help > Build a kernel suitable for use as a kdump capture kernel. > The same kernel binary can be used as production kernel and dump > @@ -841,23 +842,36 @@ config LOWMEM_CAM_NUM > int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL > default 3 > > -config RELOCATABLE > - bool "Build a relocatable kernel (EXPERIMENTAL)" > +config DYNAMIC_MEMSTART OK, so my one bikeshed comment here. We add DYNAMIC_MEMSTART for 32-bit, and we have RELOCATABLE for 64-bit. Then throughout almost the rest of the patch, all we're doing is duplicating what RELOCATABLE already did (e.g. if ! either thing). It works, but it is kind of ugly. Instead, could we define a helper config variable that can be used in place of that construct? Something like: config NONSTATIC_KERNEL (or whatever) bool default n ... config DYNAMIC_MEMSTART <blah> select NONSTATIC_KERNEL ... config RELOCATABLE <blah> select NONSTATIC_KERNEL Then you can do this kind of thing: default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !(NONSTATIC_KERNEL) #if defined(CONFIG_CRASH_DUMP) && !(defined(CONFIG_NONSTATIC_KERNEL)) instead of this: default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !(RELOCATABLE || DYNAMIC_MEMSTART) #if defined(CONFIG_CRASH_DUMP) && !(defined(CONFIG_RELOCATABLE) || \ defined(CONFIG_DYNAMIC_MEMSTART)) while still allowing for differences between RELOCATABLE and DYNAMIC_MEMSTART. Thoughts? josh _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev