You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.3 KiB

  1. Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  2. Description: Add SH supprt
  3. The test-suite logs can be found at:
  4. .
  5. <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>
  6. ---
  7. harness/main.c | 2 +-
  8. src/libaio.h | 4 +++-
  9. src/syscall-sh.h | 6 ++++++
  10. src/syscall.h | 2 ++
  11. 4 files changed, 12 insertions(+), 2 deletions(-)
  12. --- a/harness/main.c
  13. +++ b/harness/main.c
  14. @@ -14,7 +14,7 @@
  15. #if __LP64__ == 0
  16. #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
  17. #define KERNEL_RW_POINTER ((void *)0xc0010000)
  18. -#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
  19. +#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
  20. #define KERNEL_RW_POINTER ((void *)0x00010000)
  21. #elif defined(__hppa__)
  22. #define KERNEL_RW_POINTER ((void *)0x10100000)
  23. --- a/src/libaio.h
  24. +++ b/src/libaio.h
  25. @@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
  26. /* little endian, 32 bits */
  27. #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
  28. - defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
  29. + (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
  30. + defined(__bfin__) || defined(__MIPSEL__) || \
  31. defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
  32. (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
  33. __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
  34. @@ -84,6 +85,7 @@ typedef enum io_iocb_cmd {
  35. /* big endian, 32 bits */
  36. #elif defined(__PPC__) || defined(__s390__) || \
  37. (defined(__arm__) && defined(__ARMEB__)) || \
  38. + (defined(__sh__) && defined (__BIG_ENDIAN__)) || \
  39. defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
  40. defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
  41. (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
  42. --- /dev/null
  43. +++ b/src/syscall-sh.h
  44. @@ -0,0 +1,6 @@
  45. +/* Copy from ./arch/sh/include/asm/unistd_32.h */
  46. +#define __NR_io_setup 245
  47. +#define __NR_io_destroy 246
  48. +#define __NR_io_getevents 247
  49. +#define __NR_io_submit 248
  50. +#define __NR_io_cancel 249
  51. --- a/src/syscall.h
  52. +++ b/src/syscall.h
  53. @@ -33,6 +33,8 @@
  54. #include "syscall-parisc.h"
  55. #elif defined(__mips__)
  56. #include "syscall-mips.h"
  57. +#elif defined(__sh__)
  58. +#include "syscall-sh.h"
  59. #elif defined(__aarch64__) || defined(__riscv)
  60. #include "syscall-generic.h"
  61. #else