Skip to content

Conversation

@a4lg
Copy link
Contributor

@a4lg a4lg commented Apr 16, 2025

Because the current lowest requirements to run the Linux kernel on RISC-V is RV{32,64}IMA (with 32 general purpose registers) plus some features, RV32E (with only 16 GPRs) is not currently supported.

Since it's not sure whether current implemented method will work for future Linux versions even if the minimum requirements are lowered, the support for RV32E (to be more specific, an attempt to do that) is removed for now.

Since Rust doesn't have any RV32E + Linux targets, it should be safe to do that and we can safely revert this:

  • If the method removed by this commit is confirmed working when the minimum requirements of the Linux kernel are lowered and is a preferred method for feature detection and
  • When an RV32E(something) + Linux target is going to be added to Rust.

@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Because the current lowest requirements to run the Linux kernel on RISC-V is
RV{32,64}IMA (with 32 general purpose registers) plus some features,
RV32E (with only 16 GPRs) is not currently supported.

Since it's not sure whether current implemented method will work for future
Linux versions even if the minimum requirements are lowered, the support for
RV32E (to be more specific, an attempt to do that) is removed for now.
@a4lg a4lg force-pushed the riscv-linux-no-rv32e branch from 3c7ee35 to de3b3af Compare April 16, 2025 13:43
@Amanieu
Copy link
Member

Amanieu commented Apr 16, 2025

I would expected that if RV32E Linux ever happens then it would be exposed using RISCV_HWPROBE_KEY_BASE_BEHAVIOR.

@Amanieu Amanieu added this pull request to the merge queue Apr 16, 2025
Merged via the queue into rust-lang:master with commit ff4b7e1 Apr 16, 2025
60 checks passed
@a4lg
Copy link
Contributor Author

a4lg commented Apr 16, 2025

I would expected that if RV32E Linux ever happens then it would be exposed using RISCV_HWPROBE_KEY_BASE_BEHAVIOR.

I think that would be the most likely option. That's why I added the sentence in italic:

If the method removed by this commit is confirmed working when the minimum requirements of the Linux kernel are lowered and is a preferred method for feature detection

@a4lg a4lg deleted the riscv-linux-no-rv32e branch May 31, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants