<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/Documentation/rust/arch-support.rst, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-03-26T13:31:16Z</updated>
<entry>
<title>ARM: 9441/1: rust: Enable Rust support for ARMv7</title>
<updated>2025-03-26T13:31:16Z</updated>
<author>
<name>Christian Schrrefl</name>
<email>chrisi.schrefl@gmail.com</email>
</author>
<published>2025-01-30T23:03:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ccb8ce526807fcbd4578d6619100d8ec48769ea8'/>
<id>urn:sha1:ccb8ce526807fcbd4578d6619100d8ec48769ea8</id>
<content type='text'>
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!.

This is based on the code by Sven Van Asbroeck from the original
rust branch and inspired by the AArch version by Jamie Cunliffe.

I have tested the rust samples and a custom simple MMIO module
on hardware (De1SoC FPGA + Arm A9 CPU).

Tested-by: Rudraksha Gupta &lt;guptarud@gmail.com&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Tested-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Christian Schrefl &lt;chrisi.schrefl@gmail.com&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>RISC-V: disallow gcc + rust builds</title>
<updated>2024-10-25T13:18:37Z</updated>
<author>
<name>Conor Dooley</name>
<email>conor.dooley@microchip.com</email>
</author>
<published>2024-10-01T11:28:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=33549fcf37ec461f398f0a41e1c9948be2e5aca4'/>
<id>urn:sha1:33549fcf37ec461f398f0a41e1c9948be2e5aca4</id>
<content type='text'>
During the discussion before supporting rust on riscv, it was decided
not to support gcc yet, due to differences in extension handling
compared to llvm (only the version of libclang matching the c compiler
is supported). Recently Jason Montleon reported [1] that building with
gcc caused build issues, due to unsupported arguments being passed to
libclang. After some discussion between myself and Miguel, it is better
to disable gcc + rust builds to match the original intent, and
subsequently support it when an appropriate set of extensions can be
deduced from the version of libclang.

Closes: https://lore.kernel.org/all/20240917000848.720765-2-jmontleo@redhat.com/ [1]
Link: https://lore.kernel.org/all/20240926-battering-revolt-6c6a7827413e@spud/ [2]
Fixes: 70a57b247251a ("RISC-V: enable building 64-bit kernels with rust support")
Cc: stable@vger.kernel.org
Reported-by: Jason Montleon &lt;jmontleo@redhat.com&gt;
Signed-off-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Link: https://lore.kernel.org/r/20241001-playlist-deceiving-16ece2f440f5@spud
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>arch: um: rust: Add i386 support for Rust</title>
<updated>2024-07-03T10:22:22Z</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2024-06-04T22:40:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ab0f4cedc3554f921691ce5b63d59e258154e799'/>
<id>urn:sha1:ab0f4cedc3554f921691ce5b63d59e258154e799</id>
<content type='text'>
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 support CONFIG_X86_32.

We still use generate_rust_target, rather than a built-in rustc target,
in order 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 &lt;davidgow@google.com&gt;
Link: https://patch.msgid.link/20240604224052.3138504-1-davidgow@google.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux</title>
<updated>2024-05-22T16:56:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-05-22T16:56:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0bfbc914d9433d8ac2763a9ce99ce7721ee5c8e0'/>
<id>urn:sha1:0bfbc914d9433d8ac2763a9ce99ce7721ee5c8e0</id>
<content type='text'>
Pull RISC-V updates from Palmer Dabbelt:

 - Add byte/half-word compare-and-exchange, emulated via LR/SC loops

 - Support for Rust

 - Support for Zihintpause in hwprobe

 - Add PR_RISCV_SET_ICACHE_FLUSH_CTX prctl()

 - Support lockless lockrefs

* tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (42 commits)
  riscv: defconfig: Enable CONFIG_CLK_SOPHGO_CV1800
  riscv: select ARCH_HAS_FAST_MULTIPLIER
  riscv: mm: still create swiotlb buffer for kmalloc() bouncing if required
  riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
  riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
  riscv: mm: Always use an ASID to flush mm contexts
  riscv: mm: Preserve global TLB entries when switching contexts
  riscv: mm: Make asid_bits a local variable
  riscv: mm: Use a fixed layout for the MM context ID
  riscv: mm: Introduce cntx2asid/cntx2version helper macros
  riscv: Avoid TLB flush loops when affected by SiFive CIP-1200
  riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma
  riscv: mm: Combine the SMP and UP TLB flush code
  riscv: Only send remote fences when some other CPU is online
  riscv: mm: Broadcast kernel TLB flushes only when needed
  riscv: Use IPIs for remote cache/TLB flushes by default
  riscv: Factor out page table TLB synchronization
  riscv: Flush the instruction cache during SMP bringup
  riscv: hwprobe: export Zihintpause ISA extension
  riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code
  ...
</content>
</entry>
<entry>
<title>RISC-V: enable building 64-bit kernels with rust support</title>
<updated>2024-04-28T21:50:34Z</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2024-04-09T17:25:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=70a57b247251aabadd67795c3097c0fcc616e533'/>
<id>urn:sha1:70a57b247251aabadd67795c3097c0fcc616e533</id>
<content type='text'>
The rust modules work on 64-bit RISC-V, with no twiddling required.
Select HAVE_RUST and provide the required flags to kbuild so that the
modules can be used. The Makefile and Kconfig changes are lifted from
work done by Miguel in the Rust-for-Linux tree, hence his authorship.
Following the rabbit hole, the Makefile changes originated in a script,
created based on config files originally added by Gary, hence his
co-authorship.

32-bit is broken in core rust code, so support is limited to 64-bit:
ld.lld: error: undefined symbol: __udivdi3

As 64-bit RISC-V is now supported, add it to the arch support table.

Co-developed-by: Gary Guo &lt;gary@garyguo.net&gt;
Signed-off-by: Gary Guo &lt;gary@garyguo.net&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Co-developed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Signed-off-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Link: https://lore.kernel.org/r/20240409-silencer-book-ce1320f06aab@spud
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>docs: rust: fix improper rendering in Arch Support page</title>
<updated>2024-03-31T18:45:18Z</updated>
<author>
<name>Bo-Wei Chen</name>
<email>tim.chenbw@gmail.com</email>
</author>
<published>2024-03-24T01:09:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01848eee20c6396e5a96cfbc9061dc37481e06fd'/>
<id>urn:sha1:01848eee20c6396e5a96cfbc9061dc37481e06fd</id>
<content type='text'>
Fix improper rendering of table cell (empty bullet list) by rendering
as a dash using the backslash escaping mechanism [1].

Link: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#escaping-mechanism [1]
Reported-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Closes: https://github.com/Rust-for-Linux/linux/issues/1069
Signed-off-by: Bo-Wei Chen &lt;tim.chenbw@gmail.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Fixes: 90868ff9cade ("LoongArch: Enable initial Rust support")
Link: https://lore.kernel.org/r/20240324010915.3089934-1-tim.chenbw@gmail.com
[ Reworded slightly title and message; use "Link:" tag. ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: rust: Enable Rust support for AArch64</title>
<updated>2024-02-09T16:12:36Z</updated>
<author>
<name>Jamie Cunliffe</name>
<email>Jamie.Cunliffe@arm.com</email>
</author>
<published>2023-10-20T15:50:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=724a75ac9542fe1f8aaa587da4d3863d8ea292fc'/>
<id>urn:sha1:724a75ac9542fe1f8aaa587da4d3863d8ea292fc</id>
<content type='text'>
This commit provides the build flags for Rust for AArch64. The core Rust
support already in the kernel does the rest. This enables the PAC ret
and BTI options in the Rust build flags to match the options that are
used when building C.

The Rust samples have been tested with this commit.

Signed-off-by: Jamie Cunliffe &lt;Jamie.Cunliffe@arm.com&gt;
Acked-by: Will Deacon &lt;will@kernel.org&gt;
Tested-by: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Tested-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Tested-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Tested-by: Fabien Parent &lt;fabien.parent@linaro.org&gt;
Link: https://lore.kernel.org/r/20231020155056.3495121-3-Jamie.Cunliffe@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>LoongArch: Enable initial Rust support</title>
<updated>2024-01-17T04:43:00Z</updated>
<author>
<name>WANG Rui</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2024-01-17T04:43:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=90868ff9cadecd46fa2a4f5501c66bfea8ade9b7'/>
<id>urn:sha1:90868ff9cadecd46fa2a4f5501c66bfea8ade9b7</id>
<content type='text'>
Enable initial Rust support for LoongArch.

Tested-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Signed-off-by: WANG Rui &lt;wangrui@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>rust: sort uml documentation arch support table</title>
<updated>2023-04-06T21:11:04Z</updated>
<author>
<name>Thomas Bamelis</name>
<email>thomas@bamelis.dev</email>
</author>
<published>2023-02-26T15:29:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e5e86572e3f20222b5d308df9ae986c06f229321'/>
<id>urn:sha1:e5e86572e3f20222b5d308df9ae986c06f229321</id>
<content type='text'>
The arch_support table was not sorted alphabetically.
Sorts the table properly.

Fixes: 0438aadfa69a ("rust: arch/um: Add support for CONFIG_RUST under x86_64 UML")
Link: https://lore.kernel.org/rust-for-linux/CANiq72nXMsnUsJNZOG-QZiCVOqa9dRUSMc4RAS3ExLZNJ7VhHg@mail.gmail.com
Reported-by: Miguel Ojeda &lt;miguel.ojeda.sandonis@gmail.com&gt;
Signed-off-by: Thomas Bamelis &lt;thomas@bamelis.dev&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>Documentation: rust: Fix arch support table</title>
<updated>2023-02-13T09:14:32Z</updated>
<author>
<name>Bagas Sanjaya</name>
<email>bagasdotme@gmail.com</email>
</author>
<published>2023-02-13T08:59:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04df97e150c83d4640540008e95d0229cb188135'/>
<id>urn:sha1:04df97e150c83d4640540008e95d0229cb188135</id>
<content type='text'>
Stephen Rothwell reported htmldocs warning when merging uml tree:

Documentation/rust/arch-support.rst:20: WARNING: Blank line required after table.

Fix the arch support table by removing extraneous simple table marker.

Link: https://lore.kernel.org/linux-next/20230213152714.78b844f4@canb.auug.org.au/
Fixes: 0438aadfa69a34 ("rust: arch/um: Add support for CONFIG_RUST under x86_64 UML")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Bagas Sanjaya &lt;bagasdotme@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
</feed>
