Merge branch '2023-09-06-riscv-fixes' into next

- Merge two patches to fix the issues with risc-v building on next after
  the merge of v2023.10-rc4 to next.