riscv32.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. diff -Nur linux-6.0.15.orig/arch/riscv/include/uapi/asm/unistd.h linux-6.0.15/arch/riscv/include/uapi/asm/unistd.h
  2. --- linux-6.0.15.orig/arch/riscv/include/uapi/asm/unistd.h 2022-12-21 17:41:16.000000000 +0100
  3. +++ linux-6.0.15/arch/riscv/include/uapi/asm/unistd.h 2023-01-09 11:28:16.590796198 +0100
  4. @@ -15,9 +15,14 @@
  5. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  6. */
  7. -#if defined(__LP64__) && !defined(__SYSCALL_COMPAT)
  8. +#ifndef __SYSCALL_COMPAT
  9. #define __ARCH_WANT_NEW_STAT
  10. #define __ARCH_WANT_SET_GET_RLIMIT
  11. +#endif /* __SYSCALL_COMPAT */
  12. +
  13. +#ifndef __LP64__
  14. +#define __ARCH_WANT_STAT64
  15. +#define __ARCH_WANT_TIME32_SYSCALLS
  16. #endif /* __LP64__ */
  17. #define __ARCH_WANT_SYS_CLONE3
  18. diff -Nur linux-6.0.15.orig/arch/riscv/Kconfig linux-6.0.15/arch/riscv/Kconfig
  19. --- linux-6.0.15.orig/arch/riscv/Kconfig 2022-12-21 17:41:16.000000000 +0100
  20. +++ linux-6.0.15/arch/riscv/Kconfig 2023-01-09 14:27:16.560750598 +0100
  21. @@ -163,8 +163,9 @@
  22. config PAGE_OFFSET
  23. hex
  24. - default 0xC0000000 if 32BIT
  25. + default 0xC0000000 if 32BIT && MMU
  26. default 0x80000000 if 64BIT && !MMU
  27. + default 0x80000000 if !MMU
  28. default 0xff60000000000000 if 64BIT
  29. config KASAN_SHADOW_OFFSET
  30. @@ -262,7 +263,6 @@
  31. select GENERIC_LIB_ASHRDI3
  32. select GENERIC_LIB_LSHRDI3
  33. select GENERIC_LIB_UCMPDI2
  34. - select MMU
  35. config ARCH_RV64I
  36. bool "RV64I"
  37. @@ -670,7 +670,6 @@
  38. default !NONPORTABLE
  39. select EFI
  40. select OF
  41. - select MMU
  42. menu "Power management options"