From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: WANG Rui <wangrui@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>, Xi Ruoyao <xry111@xry111.site>,
Xuefeng Li <lixuefeng@loongson.cn>,
loongarch@lists.linux.dev, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH] LoongArch: rust: Use rustc option -Zdirect-access-external-data
Date: Mon, 8 Jul 2024 19:52:44 +0200 [thread overview]
Message-ID: <CANiq72m35W=8V77Rcu7MKw29EXEFq102tOL_Myyx1UvMuJYUBA@mail.gmail.com> (raw)
In-Reply-To: <20240703110624.1301830-1-wangrui@loongson.cn>
On Wed, Jul 3, 2024 at 1:24 PM WANG Rui <wangrui@loongson.cn> wrote:
>
> -Zdirect-access-external-data is a new Rust compiler option added
> in Rust 1.78, which we use to optimize the access of external data
> in the Linux kernel's Rust code. This patch modifies the Rust code
> in vmlinux to directly access externa data, using PC-REL instead of
> GOT. However, Rust code whithin modules is constrained by the PC-REL
> addressing range and is explicitly set to use an indirect method.
>
> Signed-off-by: WANG Rui <wangrui@loongson.cn>
I have created a tracking issue for this in
https://github.com/rust-lang/rust/issues/127488 since there was only
the MCP, I hope that helps.
I also added it to our #2 list of unstable features -- please feel
free to ping me in the future if you add others that you will need in
the kernel, I am happy to add the entry even before you send the patch
to the kernel in order to track things (in fact, even if it is not
implemented we can still track it in the other lists).
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Cheers,
Miguel
prev parent reply other threads:[~2024-07-08 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 11:06 [PATCH] LoongArch: rust: Use rustc option -Zdirect-access-external-data WANG Rui
2024-07-08 17:52 ` Miguel Ojeda [this message]
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='CANiq72m35W=8V77Rcu7MKw29EXEFq102tOL_Myyx1UvMuJYUBA@mail.gmail.com' \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=rust-for-linux@vger.kernel.org \
--cc=wangrui@loongson.cn \
--cc=xry111@xry111.site \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).