[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72nMhUH1s0HMeLb+hfp5=u3h20ryC4uqAgB1Znuq52e=Pw@mail.gmail.com>
Date: Sat, 12 Feb 2022 16:47:33 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
rust-for-linux <rust-for-linux@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Finn Behrens <me@...enk.de>,
Adam Bratschi-Kaye <ark.email@...il.com>,
Wedson Almeida Filho <wedsonaf@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>,
Sven Van Asbroeck <thesven73@...il.com>,
Gary Guo <gary@...yguo.net>,
Boris-Chengbiao Zhou <bobo1239@....de>,
Boqun Feng <boqun.feng@...il.com>,
Douglas Su <d0u9.su@...look.com>,
Dariusz Sosnowski <dsosnowski@...snowski.pl>,
Antonio Terceiro <antonio.terceiro@...aro.org>,
Daniel Xu <dxu@...uu.xyz>, Miguel Cano <macanroj@...il.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v4 16/20] Kbuild: add Rust support
Hi Russell,
On Sat, Feb 12, 2022 at 3:17 PM Russell King (Oracle)
<linux@...linux.org.uk> wrote:
>
> Please don't use CPU_32v6* here.
>
> It probably makes more sense to add a symbol "HAVE_RUST" and have the
> appropriate architecture Kconfig files select HAVE_RUST.
We can do it whatever way arch maintainers prefer, of course. Why
would you prefer one over the other?
> Does Rust support Thumb on ARMv6 and ARMv7 architectures?
Yes, the main backend is LLVM. Some built-in targets and their support
level are listed here, if you want to take a look:
https://doc.rust-lang.org/nightly/rustc/platform-support.html
There is also a GCC backend in `rustc` [1], which is making good
progress and may eventually give us access to architectures supported
by GCC. Furthermore, a from-scratch Rust frontend for GCC [2] is being
worked on, though this effort will likely take more time to reach a
point where it may be used for the kernel.
[1] https://github.com/rust-lang/rust/tree/master/compiler/rustc_codegen_gcc
[2] https://github.com/Rust-GCC/gccrs
> Please remove every utterance of "default n" from your patch; n is the
> default default which default defaults to, so you don't need to specify
> default n to make the option default to n. It will default to n purely
> because n is the default when no default is specified.
Certainly. I am curious, though: is there a reason for most of the
other 500+ instances in the kernel tree?
> As Rust doesn't support all the architectures that the kernel supports,
> Rust must not be used for core infrastructure.
Yeah, although I am not sure I understand what you are getting at here.
Cheers,
Miguel
Powered by blists - more mailing lists