From: Alexandre ghiti <alex@ghiti.fr>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-team@android.com,
Palmer Dabbelt <palmerdabbelt@google.com>
Subject: Re: [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable
Date: Wed, 27 Oct 2021 07:07:44 +0200 [thread overview]
Message-ID: <c538d656-cef0-728f-2722-2bcc41b8f947@ghiti.fr> (raw)
In-Reply-To: <20211026212847.43108-1-palmer@dabbelt.com>
Hi Palmer,
On 10/26/21 11:28 PM, Palmer Dabbelt wrote:
> 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"
Agreed, you can add:
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Thanks for the patch,
Alex
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre ghiti <alex@ghiti.fr>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-team@android.com,
Palmer Dabbelt <palmerdabbelt@google.com>
Subject: Re: [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable
Date: Wed, 27 Oct 2021 07:07:44 +0200 [thread overview]
Message-ID: <c538d656-cef0-728f-2722-2bcc41b8f947@ghiti.fr> (raw)
In-Reply-To: <20211026212847.43108-1-palmer@dabbelt.com>
Hi Palmer,
On 10/26/21 11:28 PM, Palmer Dabbelt wrote:
> 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"
Agreed, you can add:
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Thanks for the patch,
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-10-27 5:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 21:28 [PATCH] RISC-V: Make CONFIG_RELOCATABLE user selectable Palmer Dabbelt
2021-10-26 21:28 ` Palmer Dabbelt
2021-10-27 5:07 ` Alexandre ghiti [this message]
2021-10-27 5:07 ` Alexandre ghiti
2021-10-27 8:00 ` Andreas Schwab
2021-10-27 8:00 ` Andreas Schwab
2021-10-27 8:58 ` Alexandre Ghiti
2021-10-27 8:58 ` Alexandre Ghiti
2021-10-27 9:45 ` Andreas Schwab
2021-10-27 9:45 ` Andreas Schwab
2021-10-27 23:09 ` Palmer Dabbelt
2021-10-27 23:09 ` Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c538d656-cef0-728f-2722-2bcc41b8f947@ghiti.fr \
--to=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=palmerdabbelt@google.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.