Re: [PATCH 3/3] powerpc/ppc64/kdump: better flag for running relocatable

2008-11-10 Thread Mohan Kumar M
Milton Miller wrote: On Oct 23, 2008, at 10:15 AM, Mohan Kumar M wrote: Hi Milton, My suggestions: Milton Miller wrote: i.e., [code snip 1] lwz r7,__run_at_load-_stext(r26) cmplwi cr0,r7,1/* kdump kernel ? - stay where we are */ bne 1f add

Re: [PATCH 3/3] powerpc/ppc64/kdump: better flag for running relocatable

2008-10-23 Thread Mohan Kumar M
Hi Milton, My suggestions: Milton Miller wrote: The __kdump_flag ABI is overly constraining for future development. As of 2.6.27, the kernel entry point has 4 constraints: Offset 0 is the starting point for the master (boot) cpu (entered with r3 pointing to the device tree structure),

Re: [PATCH] Support for relocatable kdump kernel

2008-10-21 Thread Mohan Kumar M
Michael Ellerman wrote: Does it? I see CONFIG_CRASH_DUMP depending on PPC64, so there is no 32-bit kdump possible. Or is someone working on it out-of-tree? IIUC Anton Vorontsov is working on the 32-bit kdump kernel support. Do you expect a function to do the checking in iommu.c? You'd

Re: [PATCH] Support for relocatable kdump kernel

2008-10-20 Thread Mohan Kumar M
Michael Ellerman wrote: Forwarded Message The purgatory code compares the signature and sets the __kdump_flag in head_64.S. During the boot up, kernel code checks __kdump_flag and if it is set, the kernel will behave as relocatable kdump kernel. This kernel will boot at the

Re: [PATCH] Support for relocatable kdump kernel

2008-10-16 Thread Mohan Kumar M
Paul Mackerras wrote: Mohan Kumar M writes: Support for relocatable kdump kernel @@ -1401,9 +1414,21 @@ _STATIC(__after_prom_start) beq 9f /* have already put us at zero */ li r6,0x100/* Start offset, the first 0x100

[PATCH] Support for relocatable kdump kernel

2008-10-12 Thread Mohan Kumar M
the changes suggested by Paul Mackerrass to avoid GOT use and to avoid two copies of the code. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- Documentation/kdump/kdump.txt | 14 ++--- arch/powerpc/Kconfig |8 ++- arch/powerpc/include/asm/kdump.h

Re: [PATCH] Fix kdump kernel hang issue with relocatable kernel patches

2008-10-09 Thread Mohan Kumar M
Paul Mackerras wrote: Hmmm. Is there any reason to continue to support non-relocatable 64-bit kernels being kdump kernels? In other words, for 64-bit, couldn't we make CONFIG_CRASH_DUMP depend on CONFIG_RELOCATABLE? We wanted to support legacy kdump feature on 64 bit kernels for some

Re: [PATCH] powerpc: dtb and purgatory support for ppc32

2008-10-02 Thread Mohan Kumar M
Simon Horman wrote: On Thu, Oct 02, 2008 at 09:50:16AM +0200, Sebastian Siewior wrote: I'm not speaking on behalf of Kumar Gala, just on behalf of myself. Hi Horms, I would like to get some review of this patch by if possible. Also, I'm a little unclear of how it will interact with the

[PATCH] Fix kdump kernel hang issue with relocatable kernel patches

2008-10-01 Thread Mohan Kumar M
(ie 32MB) instead of 0. This patch fixes this issue. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/head_64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 84856be..8934500 100644

[PATCH] Support for relocatable kdump kernel

2008-10-01 Thread Mohan Kumar M
-by: Mohan Kumar M [EMAIL PROTECTED] --- Documentation/kdump/kdump.txt | 14 ++-- arch/powerpc/Kconfig |4 +- arch/powerpc/include/asm/kdump.h | 16 arch/powerpc/kernel/crash_dump.c |2 + arch/powerpc/kernel/head_64.S | 60

Re: [PATCH] Remove legacy kdump kernel build support

2008-10-01 Thread Mohan Kumar M
Anton Vorontsov wrote: On Tue, Sep 30, 2008 at 06:18:28PM +0530, Mohan Kumar M wrote: Remove legacy kdump kernel build support Hi, I have submitted the patch to support relocatable kdump kernel with retaining legacy kdump build support. Regards, Mohan. Can we leave the legacy support

[PATCH] Remove legacy kdump kernel build support

2008-09-30 Thread Mohan Kumar M
-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/Kconfig|2 - arch/powerpc/include/asm/iommu.h|5 arch/powerpc/include/asm/kdump.h| 35 -- arch/powerpc/include/asm/page.h |1 - arch/powerpc/kernel/crash.c

[PATCH 2/2] Support for relocatable kdump kernel

2008-09-30 Thread Mohan Kumar M
will boot at the address where it was loaded by kexec-tools ie at the address reserved through crashkernel boot parameter. Now for kdump, both CONFIG_RELOCATABLE and CONFIG_CRASH_DUMP should be enabled and the same kernel can be used as production and kdump kernel. Signed-off-by: Mohan Kumar M [EMAIL

[PATCH] Relocatable kdump kernel support in kexec-tools

2008-09-30 Thread Mohan Kumar M
. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S index b3563de..f69dad2 100644 --- a/purgatory/arch/ppc64/v2wrap.S +++ b/purgatory/arch/ppc64/v2wrap.S @@ -45,6 +45,7 @@ orisrn,rn,[EMAIL PROTECTED

Re: [PATCH 0/5] Relocatable 64-bit kernel using linker PIE support

2008-08-19 Thread Mohan Kumar M
Paul Mackerras wrote: Mohan Kumar M writes: Attaching the .config Hmmm, your config works for me on a POWER6 partition here, whether I netboot the zImage.pseries or boot it with yaboot. I wonder if your toolchain is an older version. What is the output from ld --version and gcc --version

Re: [PATCH 0/5] Relocatable 64-bit kernel using linker PIE support

2008-08-18 Thread Mohan Kumar M
Hi Paul, I can't boot zImage with your patches. I'm getting the following error message from prom_init.c Error: You can't boot a kdump kernel from OF! This is due to the check: if (PHYSICAL_START 0) prom_panic(Error: You can't boot a kdump kernel from OF!\n); where

Re: [PATCH 0/5] Relocatable 64-bit kernel using linker PIE support

2008-08-18 Thread Mohan Kumar M
Hi Paul, Attaching the .config Paul Mackerras wrote: Mohan Kumar M writes: If you need, I can give the .config I use. Yes please, send it over. # # Automatically generated make config: don't edit # Linux kernel version: 2.6.27-rc1 # Mon Aug 18 14:24:37 2008 # CONFIG_PPC64=y

Re: [PATCH 4/5] Relocation support

2008-08-13 Thread Mohan Kumar M
Paul Mackerras wrote: Mohan Kumar M writes: Hi Paul, Thanks for your comments. I will update the patches as per your comment and will give a detailed description for each patch. Regards, Mohan. static inline int in_kernel_text(unsigned long addr) { - if (addr = (unsigned long

[PATCH 2/5] Build files needed for relocation

2008-08-12 Thread Mohan Kumar M
As my scripts did wrong commit, I have posted wrong patches. I am posting the patches 3,4 and 5 again. Sorry for the inconvenience. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

[PATCH 2/5] Build files needed for relocation

2008-08-12 Thread Mohan Kumar M
of relocation apply code. TODO: Relocatable vmlinux image is built in arch/powerpc/boot as vmlinux.reloc. But it should be built in top level directory of kernel source as vmlinux instead of vmlinux.reloc Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/Kconfig| 15

[PATCH 3/5] Apply relocation

2008-08-12 Thread Mohan Kumar M
offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to the relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/reloc_apply.S | 242 +++ 1 files changed, 242

[PATCH 4/5] Relocation support

2008-08-12 Thread Mohan Kumar M
@got entries. So use LOAD_REG_IMMEDIATE macro instead of LOAD_REG_ADDR macro for relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/include/asm/ppc_asm.h |4 ++ arch/powerpc/include/asm/prom.h|2 + arch/powerpc/include/asm/sections.h|4

[PATCH 5/5] Relocation support for kdump kernel

2008-08-12 Thread Mohan Kumar M
Relocation support for kdump kernel Add relocation kernel support for kdump kernel path. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/crash_dump.c | 19 +++ arch/powerpc/kernel/iommu.c|7 +-- arch/powerpc/kernel

[PATCH 0/5] Relocatable kernel support for PPC64

2008-08-11 Thread Mohan Kumar M
Hi, Following five patches enable the relocatable kernel feature for PPC64 kernels. 1. Extract list of relocation offsets.patch 2. Build files needed for relocation.patch 3. Apply relocation.patch 4. Relocation support.patch 5. Relocation support for kdump

[PATCH 1/5] Extract list of relocation offsets

2008-08-11 Thread Mohan Kumar M
type and this information is appended to the normal vmlinux file by using the patch relocation_build.patch Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/relocs.c | 820 1 files changed, 820 insertions(+), 0 deletions(-) create

[PATCH 2/5] Build files needed for relocation

2008-08-11 Thread Mohan Kumar M
of relocation apply code. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/Kconfig | 15 --- arch/powerpc/Makefile |9 +++-- arch/powerpc/boot/Makefile | 39 --- 3 files changed, 55 insertions(+), 8 deletions

[PATCH 3/5] Apply relocation

2008-08-11 Thread Mohan Kumar M
offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to the relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/vmlinux.lds.S | 28 arch/powerpc/boot/vmlinux.reloc.scr

[PATCH 4/5] Relocation support

2008-08-11 Thread Mohan Kumar M
@got entries. So use LOAD_REG_IMMEDIATE macro instead of LOAD_REG_ADDR macro for relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/include/asm/ppc_asm.h |4 ++ arch/powerpc/include/asm/prom.h|2 + arch/powerpc/include/asm/sections.h|4

[PATCH 5/5] Relocation support for kdump kernel

2008-08-11 Thread Mohan Kumar M
Relocation support for kdump kernel Add relocation kernel support for kdump kernel path. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/crash_dump.c | 19 +++ arch/powerpc/kernel/iommu.c|7 - arch/powerpc/kernel/machine_kexec.c

Re: [RFC v3 PATCH 1/4] Extract list of relocation offsets

2008-07-22 Thread Mohan Kumar M
Paul Mackerras wrote: Mohan Kumar M writes: diff --git a/arch/powerpc/boot/relocs.c b/arch/powerpc/boot/relocs.c new file mode 100644 index 000..31ca903 Where did this file come from? Did you write it all yourself? If not, then you need to credit the original author in the patch

Re: [RFC v3 PATCH 4/4] Relocation support

2008-07-21 Thread Mohan Kumar M
Segher Boessenkool wrote: This patch changes all LOAD_REG_ADDR macro calls to LOAD_REG_IMMEDIATE to make sure that we load the correct address. Did you figure out _why_ LOAD_REG_ADDR doesn't work? Using LOAD_REG_IMMEDIATE is actually a step back, it makes the kernel binary non-PIC. And

Re: [RFC v3 PATCH 1/4] Extract list of relocation offsets

2008-07-21 Thread Mohan Kumar M
to the normal vmlinux file by using the patch relocation_build.patch Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/relocs.c | 865 1 files changed, 865 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/relocs.c diff --git

Re: [RFC v3 PATCH 2/4] Build files needed for relocation

2008-07-21 Thread Mohan Kumar M
of relocation apply code. TODO: Relocatable vmlinux image is built in arch/powerpc/boot as vmlinux.reloc. But it should be built in top level directory of kernel source as vmlinux instead of vmlinux.reloc Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/Kconfig| 15

Re: [RFC v3 PATCH 3/4] Apply relocation

2008-07-21 Thread Mohan Kumar M
offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/reloc_apply.S | 229 +++ 1 files changed, 229 insertions

Re: [RFC v3 PATCH 4/4] Relocation support

2008-07-21 Thread Mohan Kumar M
by adding the relocation kernel base address. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/head_64.S | 53 ++- arch/powerpc/kernel/machine_kexec_64.c |4 +- arch/powerpc/kernel/prom_init.c| 27 ++-- arch/powerpc

Re: [RFC v3 PATCH 5/4] Relocation support for kdump kernel

2008-07-21 Thread Mohan Kumar M
Relocation support for kdump kernel This patch adds relocation support for the kdump kernel path Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/crash_dump.c | 19 +++ arch/powerpc/kernel/iommu.c|7 - arch/powerpc/kernel

Re: [RFC v3 PATCH 6/4] Use LOAD_REG_IMMEDIATE macros

2008-07-21 Thread Mohan Kumar M
Use LOAD_REG_IMMEDIATE macros This patch changes all LOAD_REG_ADDR macro calls to LOAD_REG_IMMEDIATE to make sure that we load the correct address. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/entry_64.S |4 ++-- arch/powerpc/mm/hash_low_64.S

Re: [RFC v3 PATCH 6/4] Use LOAD_REG_IMMEDIATE macros

2008-07-21 Thread Mohan Kumar M
Paul Mackerras wrote: Mohan Kumar M writes: @@ -714,7 +714,7 @@ _GLOBAL(enter_rtas) stdr6,PACASAVEDMSR(r13) /* Setup our real return addr */ - LOAD_REG_ADDR(r4,.rtas_return_loc) + LOAD_REG_IMMEDIATE(r4,.rtas_return_loc) If LOAD_REG_ADDR doesn't work

[RFC v3 PATCH 0/4] Relocatable kernel support for PPC64

2008-07-17 Thread Mohan Kumar M
Hi, Following four patches enable the relocatable kernel feature for PPC64 kernels. 1. extract_relocation_info.patch 2. relocation_build.patch 3. apply_relocation.patch 4. relocation_support.patch With the patchset, vmcore image of a crashed system can be captured

[RFC v3 PATCH 1/4] Extract list of relocation offsets

2008-07-17 Thread Mohan Kumar M
type and this information is appended to the normal vmlinux file by using the patch relocation_build.patch Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/relocs.c | 865 + 1 file changed, 865 insertions(+) Index: linux-2.6.26/arch

[RFC v3 PATCH 2/4] Build files needed for relocation support

2008-07-17 Thread Mohan Kumar M
of relocation apply code. TODO: Relocatable vmlinux image is built in arch/powerpc/boot as vmlinux.reloc. But it should be built in top level directory of kernel source as vmlinux instead of vmlinux.reloc Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/Kconfig| 15

[RFC v3 PATCH 3/4] Apply relocation info to vmlinux

2008-07-17 Thread Mohan Kumar M
offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/boot/reloc_apply.S | 229 1 file changed, 229 insertions

[RFC v3 PATCH 4/4] Relocation support

2008-07-17 Thread Mohan Kumar M
Relocation support This patch changes all LOAD_REG_ADDR macro calls to LOAD_REG_IMMEDIATE to make sure that we load the correct address. It also takes care of when accessing absolute symbols in the code by adding the relocation kernel base address. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED

Re: [RFC v3 PATCH 1/4] Extract list of relocation offsets

2008-07-17 Thread Mohan Kumar M
Benjamin Herrenschmidt wrote: On Fri, 2008-07-18 at 00:10 +0530, Mohan Kumar M wrote: Extract list of relocation offsets Extract list of offsets in the vmlinux file for which the relocation delta has to be patched. Currently only following type of relocation types are considered

[RFC v2 PATCH 1/4] Extract list of relocation offsets

2008-07-07 Thread Mohan Kumar M
type and this information is appended to the normal vmlinux file by using the patch relocation_build.patch Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/relocs.c | 865 ++ 1 file changed, 865 insertions(+) Index: linux-2.6.26-rc9

[RFC v2 PATCH 2/4] Build files needed for relocation support

2008-07-07 Thread Mohan Kumar M
of relocation apply code. File make.reloc is used to build the relocatable kernel vmlinux.reloc. TODO: I have not yet integrated building relocatable kernel with kernel Makefile. I need help to integrate this into kernel build process. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc

[RFC v2 PATCH 3/4] Apply relocation info to vmlinux

2008-07-07 Thread Mohan Kumar M
offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- arch/powerpc/kernel/reloc_apply.S | 229 ++ 1 file changed, 229 insertions

[RFC v2 PATCH 4/4] Relocation support

2008-07-07 Thread Mohan Kumar M
Relocation support This patch changes all LOAD_REG_ADDR macro calls to LOAD_REG_IMMEDIATE to make sure that we load the correct address. It also takes care of when accessing absolute symbols in the code by adding the relocation kernel base address. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED

[RFC PATCH 0/4] Relocable kernel support for PPC64

2008-05-29 Thread Mohan Kumar M
Hi, Following four patches enable the relocatable kernel feature for PPC64 kernels. 1. extract_relocation_info.patch 2. relocation_build.patch 3. apply_relocation.patch 4. relocation_support.patch With the patchset, vmcore image of a crashed system can be captured

[RFC PATCH 0/4] Relocatable kernel support for PPC64

2008-05-29 Thread Mohan Kumar M
Hi, Following four patches enable the relocatable kernel feature for PPC64 kernels. 1. extract_relocation_info.patch 2. relocation_build.patch 3. apply_relocation.patch 4. relocation_support.patch With the patchset, vmcore image of a crashed system can be captured

[RFC PATCH 1/4] Extract list of relocation offsets

2008-05-29 Thread Mohan Kumar M
type and this information is appended to the normal vmlinux file by using the patch relocation_build.patch Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- Index: linux-2.6.26-rc3/arch/powerpc/relocs.c === --- /dev/null +++ linux

[RFC PATCH 2/4] Build files needed for relocation support

2008-05-29 Thread Mohan Kumar M
of relocation apply code. File make.reloc is used to build the relocatable kernel vmlinux.reloc. TODO: I have not yet integrated building relocatable kernel with kernel Makefile. I need help to integrate this into kernel build process. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- Index: linux

[RFC PATCH 3/4] Apply relocation info to vmlinux

2008-05-29 Thread Mohan Kumar M
delta to each offset in the list which was generated and appended by patch 1 and 2. After updating all offsets, control is given to relocatable kernel. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED] --- Index: linux-2.6.26-rc3/arch/powerpc/kernel/reloc_apply.S

[RFC PATCH 4/4] Relocation support

2008-05-29 Thread Mohan Kumar M
Relocation support This patch changes all LOAD_REG_ADDR macro calls to LOAD_REG_IMMEDIATE to make sure that we load the correct address. It also takes care of absolute symbols access in the code by adding the relocation kernel base address. Signed-off-by: Mohan Kumar M [EMAIL PROTECTED