[PATCH v1 0/2] RISC-V: Fixes for riscv_has_extension[un]likely()'s alternative dependency

Palmer Dabbelt palmer at rivosinc.com
Thu Mar 30 14:02:45 PDT 2023


On Fri, 24 Mar 2023 10:05:37 +0000, Conor Dooley wrote:
> Here's my attempt at fixing both the use of an FPU on XIP kernels and
> the issue that Jason ran into where CONFIG_FPU, which needs the
> alternatives frame work for has_fpu() checks, could be enabled without
> the alternatives actually being present.
> 
> For the former, a "slow" fallback that does not use alternatives is
> added to riscv_has_extension_[un]likely() that can be used with XIP.
> Obviously, we want to make use of Jisheng's alternatives based approach
> where possible, so any users of riscv_has_extension_[un]likely() will
> want to make sure that they select RISCV_ALTERNATIVE.
> If they don't however, they'll hit the fallback path which (should,
> sparing a silly mistake from me!) behave in the same way, thus
> succeeding silently. Sounds like a
> 
> [...]

Applied, thanks!

[1/2] RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely()
      https://git.kernel.org/palmer/c/1aa866931b80
[2/2] RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels
      https://git.kernel.org/palmer/c/1ee7fc3f4d0a

Best regards,
-- 
Palmer Dabbelt <palmer at rivosinc.com>




More information about the linux-riscv mailing list