Skip to content

Relocatable kernel support for PPC64

Mohan Kumar M linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Extract list of relocation offsetsarch/powerpc/boot/relocs.c+820 -00 replies
2/5Build files needed for relocationarch/powerpc/Kconfig arch/powerpc/Makefile arch/powerpc/boot/Makefile+55 -80 replies
2/5Build files needed for relocation+0 -00 replies
2/5Build files needed for relocationarch/powerpc/Kconfig arch/powerpc/Makefile arch/powerpc/boot/Makefile +2 more+91 -80 replies
3/5Apply relocationarch/powerpc/boot/vmlinux.lds.S arch/powerpc/boot/vmlinux.reloc.scr+36 -01 reply
3/5Apply relocationarch/powerpc/boot/reloc_apply.S+242 -01 reply
4/5Relocation supportarch/powerpc/include/asm/ppc_asm.h arch/powerpc/include/asm/prom.h arch/powerpc/include/asm/sections.h +10 more+114 -180 replies
4/5Relocation supportarch/powerpc/include/asm/ppc_asm.h arch/powerpc/include/asm/prom.h arch/powerpc/include/asm/sections.h +12 more+158 -272 replies
5/5Relocation support for kdump kernelarch/powerpc/kernel/crash_dump.c arch/powerpc/kernel/iommu.c arch/powerpc/kernel/machine_kexec.c +4 more+81 -140 replies
5/5Relocation support for kdump kernelarch/powerpc/kernel/crash_dump.c arch/powerpc/kernel/iommu.c arch/powerpc/kernel/machine_kexec.c +2 more+37 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Relocatable kernel support for PPC64

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 kernel.patch

Paul, can you please merge these patches to the powerpc git tree?

With the patchset, vmcore image of a crashed system can be captured using the same kernel binary.

Still the kernel is not a fully relocatable kernel. It can either run at 0 or 32MB based on which address its loaded. If its loaded by 'kexec -p', it behaves as a relocatable kernel and runs at 32MB(even though its compiled for 0). If the same kernel is loaded by yaboot or kexec -l, it will behave as a normal kernel and will run at the compiled address.

Difference between previous patchset and current
* The problem kdump kernel boot fail on some specific systems is fixed now.
* Kdump kernel boot failed with git tree kernels, its fixed now.

Issues:
* 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

Limitation:

* During kdump kernel boot, all secondary processors are stuck up. But during yaboot all secondary processors are brought online.

Since relocatable kernel is used only for kdump kernels and kdump kernel is always booted with "maxcpus=1" kernel parameter, there is no significant difference. It can be marked as a known issue. (I am trying to fix this issue)

Tested on POWER5 systems.

Regards,
Mohan.