[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a83b0149-7055-411b-ba86-d227919c7c32@app.fastmail.com>
Date: Fri, 31 Jan 2025 08:40:45 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Christian Schrefl" <chrisi.schrefl@...il.com>,
"Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>,
"Boqun Feng" <boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
"Benno Lossin" <benno.lossin@...ton.me>,
"Andreas Hindborg" <a.hindborg@...nel.org>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Jonathan Corbet" <corbet@....net>, "Russell King" <linux@...linux.org.uk>,
"Rudraksha Gupta" <guptarud@...il.com>, "Ard Biesheuvel" <ardb@...nel.org>,
"Geert Stappers" <stappers@...ppers.nl>, "Andrew Lunn" <andrew@...n.ch>,
"Jamie Cunliffe" <Jamie.Cunliffe@....com>,
"Sven Van Asbroeck" <thesven73@...il.com>
Cc: rust-for-linux@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3] arm: rust: Enable Rust support for ARMv7
On Thu, Jan 23, 2025, at 23:40, Christian Schrefl wrote:
> This commit allows building ARMv7 kernels with Rust support.
>
> The rust core library expects some __eabi_... functions
> that are not implemented in the kernel.
> Those functions are some float operations and __aeabi_uldivmod.
> For now those are implemented with define_panicking_intrinsics!.
I see you are doing this part the same as the other architectures,
but I don't see why it's done like this in the first place:
In C code, we really want to get a link failure rather than a
runtime error in order to catch those bugs as early as possible
and fix them before even trying to run the kernel. Is there a
reason this doesn't work in rust, or is there a plan to change
this later when the existing callers of those functions have
been fixed?
202397be76d8037b531b34dee16c7dfcfd0124ef..3375c91e698c024f95a85682f5a91d9815c355e5
> 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -130,6 +130,7 @@ config ARM
> select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
> select HAVE_REGS_AND_STACK_ACCESS_API
> select HAVE_RSEQ
> + select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7
The ARMv7 dependency makes sense, but I think it needs
be disabled on combined v6/v7 kernels, like (CPU_V7 && !CPU_V6 && !CPU_V6K).
ARnd
Powered by blists - more mailing lists