public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable
@ 2021-10-26 21:28 Palmer Dabbelt
  2021-10-27  5:07 ` Alexandre ghiti
  2021-10-27  8:00 ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2021-10-26 21:28 UTC (permalink / raw)
  To: alex
  Cc: Paul Walmsley, Palmer Dabbelt, aou, linux-riscv, linux-kernel,
	kernel-team, Palmer Dabbelt

From: Palmer Dabbelt <palmerdabbelt@google.com>

This should really be up to the user, as it trades off portability for
performance.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 arch/riscv/Kconfig | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 5dea03549493..f8a36034d54b 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -212,18 +212,6 @@ config PGTABLE_LEVELS
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config RELOCATABLE
-	bool
-	depends on MMU && 64BIT && !XIP_KERNEL
-	help
-          This builds a kernel as a Position Independent Executable (PIE),
-          which retains all relocation metadata required to relocate the
-          kernel binary at runtime to a different virtual address than the
-          address it was linked at.
-          Since RISCV uses the RELA relocation format, this requires a
-          relocation pass at runtime even if the kernel is loaded at the
-          same address it was linked at.
-
 source "arch/riscv/Kconfig.socs"
 source "arch/riscv/Kconfig.erratas"
 
@@ -433,6 +421,18 @@ config CRASH_DUMP
 
 	  For more details see Documentation/admin-guide/kdump/kdump.rst
 
+config RELOCATABLE
+	bool "Build a relocatable kernel"
+	depends on MMU && 64BIT && !XIP_KERNEL
+	help
+          This builds a kernel as a Position Independent Executable (PIE),
+          which retains all relocation metadata required to relocate the
+          kernel binary at runtime to a different virtual address than the
+          address it was linked at.
+          Since RISCV uses the RELA relocation format, this requires a
+          relocation pass at runtime even if the kernel is loaded at the
+          same address it was linked at.
+
 endmenu
 
 menu "Boot options"
-- 
2.33.0.1079.g6e70778dc9-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-27 23:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-26 21:28 [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable Palmer Dabbelt
2021-10-27  5:07 ` Alexandre ghiti
2021-10-27  8:00 ` Andreas Schwab
2021-10-27  8:58   ` Alexandre Ghiti
2021-10-27  9:45     ` Andreas Schwab
2021-10-27 23:09       ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox