From: Nathan Chancellor <nathan@kernel.org>
To: David Gow <davidgow@google.com>
Cc: "Brendan Higgins" <brendan.higgins@linux.dev>,
"Rae Moar" <rmoar@google.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Richard Weinberger" <richard@nod.at>,
"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
"Johannes Berg" <johannes@sipsolutions.net>,
kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
linux-um@lists.infradead.org, rust-for-linux@vger.kernel.org,
x86@kernel.org, "Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] arch: um: rust: Add i386 support for Rust
Date: Tue, 4 Jun 2024 23:22:34 -0700 [thread overview]
Message-ID: <20240605062234.GE279426@thelio-3990X> (raw)
In-Reply-To: <20240604224052.3138504-1-davidgow@google.com>
Hi David,
Just a fly by comment on style, I don't have much to say content :)
On Wed, Jun 05, 2024 at 06:40:50AM +0800, David Gow wrote:
> At present, Rust in the kernel only supports 64-bit x86, so UML has
> followed suit. However, it's significantly easier to support 32-bit i386
> on UML than on bare metal, as UML does not use the -mregparm option
> (which alters the ABI), which is not yet supported by rustc[1].
>
> Add support for CONFIG_RUST on um/i386, by adding a new target config to
> generate_rust_target, and replacing various checks on CONFIG_X86_64 to
> also probably like support CONFIG_X86_32.
>
> We still use generate_rust_target, rather than a built-in rustc target,
> in oPrder to match x86_64, provide a future place for -mregparm, and more
> easily disable floating point instructions.
>
> With these changes, the KUnit tests pass with:
> kunit.py run --make_options LLVM=1 --kconfig_add CONFIG_RUST=y
> --kconfig_add CONFIG_64BIT=n --kconfig_add CONFIG_FORTIFY_SOURCE=n
>
> An earlier version of these changes was proposed on the Rust-for-Linux
> github[2].
>
> [1]: https://github.com/rust-lang/rust/issues/116972
> [2]: https://github.com/Rust-for-Linux/linux/pull/966
>
> Signed-off-by: David Gow <davidgow@google.com>
...
> -ifdef CONFIG_X86_64
> +ifneq ($(or $(CONFIG_X86_64),$(CONFIG_X86_32)),)
These configurations are mutually exclusive, so would it look more
readable to have it be:
ifeq ($(CONFIG_X86_32)$(CONFIG_X86_64),y)
?
Cheers.
Nathan
next prev parent reply other threads:[~2024-06-05 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 22:40 David Gow
2024-06-05 6:22 ` Nathan Chancellor [this message]
2024-06-05 17:59 ` Ard Biesheuvel
2024-06-05 18:02 ` Johannes Berg
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=20240605062234.GE279426@thelio-3990X \
--to=nathan@kernel.org \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=brendan.higgins@linux.dev \
--cc=dave.hansen@linux.intel.com \
--cc=davidgow@google.com \
--cc=gary@garyguo.net \
--cc=hpa@zytor.com \
--cc=johannes@sipsolutions.net \
--cc=kunit-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=ojeda@kernel.org \
--cc=richard@nod.at \
--cc=rmoar@google.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=wedsonaf@gmail.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®