diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-05-29 17:39:40 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-05-30 14:59:51 +1000 |
commit | 951eedebcdea06fdcc742c82dc347509ce0e1ba4 (patch) | |
tree | e019d53fbd8e6f4e4edd0644440e62a1f4c5f038 /arch/powerpc/Kconfig | |
parent | 4ea80652dc75482dca1739762075dd5caa57ae29 (diff) | |
download | op-kernel-dev-951eedebcdea06fdcc742c82dc347509ce0e1ba4.zip op-kernel-dev-951eedebcdea06fdcc742c82dc347509ce0e1ba4.tar.gz |
powerpc/64: Handle linker stubs in low .text code
Very large kernels may require linker stubs for branches from HEAD
text code. The linker may place these stubs before the HEAD text
sections, which breaks the assumption that HEAD text is located at 0
(or the .text section being located at 0x7000/0x8000 on Book3S
kernels).
Provide an option to create a small section just before the .text
section with an empty 256 - 4 bytes, and adjust the start of the .text
section to match. The linker will tend to put stubs in that section
and not break our relative-to-absolute offset assumptions.
This causes a small waste of space on common kernels, but allows large
kernels to build and boot. For now, it is an EXPERT config option,
defaulting to =n, but a reference is provided for it in the build-time
check for such breakage. This is good enough for allyesconfig and
custom users / hackers.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r-- | arch/powerpc/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index d090275a..0153275 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -455,6 +455,17 @@ config PPC_TRANSACTIONAL_MEM ---help--- Support user-mode Transactional Memory on POWERPC. +config LD_HEAD_STUB_CATCH + bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT + depends on PPC64 + default n + help + Very large kernels can cause linker branch stubs to be generated by + code in head_64.S, which moves the head text sections out of their + specified location. This option can work around the problem. + + If unsure, say "N". + config DISABLE_MPROFILE_KERNEL bool "Disable use of mprofile-kernel for kernel tracing" depends on PPC64 && CPU_LITTLE_ENDIAN |