diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/arch.mak | 1 | ||||
-rw-r--r-- | arch/m68k/bits/alltypes.h.in | 16 | ||||
-rw-r--r-- | arch/m68k/bits/endian.h | 1 | ||||
-rw-r--r-- | arch/m68k/bits/ipcstat.h | 2 | ||||
-rw-r--r-- | arch/m68k/bits/limits.h | 7 | ||||
-rw-r--r-- | arch/m68k/bits/msg.h | 15 | ||||
-rw-r--r-- | arch/m68k/bits/posix.h | 2 | ||||
-rw-r--r-- | arch/m68k/bits/reg.h | 2 | ||||
-rw-r--r-- | arch/m68k/bits/sem.h | 10 | ||||
-rw-r--r-- | arch/m68k/bits/shm.h | 16 | ||||
-rw-r--r-- | arch/m68k/bits/stat.h | 6 | ||||
-rw-r--r-- | arch/m68k/bits/stdint.h | 20 | ||||
-rw-r--r-- | arch/m68k/bits/syscall.h.in | 37 | ||||
-rw-r--r-- | arch/m68k/bits/user.h | 5 | ||||
-rw-r--r-- | arch/m68k/pthread_arch.h | 7 | ||||
-rw-r--r-- | arch/m68k/syscall_arch.h | 1 |
16 files changed, 70 insertions, 78 deletions
diff --git a/arch/m68k/arch.mak b/arch/m68k/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/m68k/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/m68k/bits/alltypes.h.in b/arch/m68k/bits/alltypes.h.in index bd37a631..f5646909 100644 --- a/arch/m68k/bits/alltypes.h.in +++ b/arch/m68k/bits/alltypes.h.in @@ -1,9 +1,10 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int -TYPEDEF __builtin_va_list va_list; -TYPEDEF __builtin_va_list __isoc_va_list; +#define __BYTE_ORDER 4321 +#define __LONG_MAX 0x7fffffffL #ifndef __cplusplus #ifdef __WCHAR_TYPE__ @@ -22,14 +23,3 @@ TYPEDEF long double double_t; #endif TYPEDEF struct { long long __ll; long double __ld; } max_align_t; - -TYPEDEF long time_t; -TYPEDEF long suseconds_t; - -TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; diff --git a/arch/m68k/bits/endian.h b/arch/m68k/bits/endian.h deleted file mode 100644 index ef074b77..00000000 --- a/arch/m68k/bits/endian.h +++ /dev/null @@ -1 +0,0 @@ -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/arch/m68k/bits/ipcstat.h b/arch/m68k/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/m68k/bits/ipcstat.h +++ b/arch/m68k/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/m68k/bits/limits.h b/arch/m68k/bits/limits.h deleted file mode 100644 index fbc6d238..00000000 --- a/arch/m68k/bits/limits.h +++ /dev/null @@ -1,7 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define LONG_BIT 32 -#endif - -#define LONG_MAX 0x7fffffffL -#define LLONG_MAX 0x7fffffffffffffffLL diff --git a/arch/m68k/bits/msg.h b/arch/m68k/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/m68k/bits/msg.h +++ b/arch/m68k/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/m68k/bits/posix.h b/arch/m68k/bits/posix.h deleted file mode 100644 index 30a38714..00000000 --- a/arch/m68k/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _POSIX_V6_ILP32_OFFBIG 1 -#define _POSIX_V7_ILP32_OFFBIG 1 diff --git a/arch/m68k/bits/reg.h b/arch/m68k/bits/reg.h index 99201f70..fedc4f9f 100644 --- a/arch/m68k/bits/reg.h +++ b/arch/m68k/bits/reg.h @@ -1,5 +1,3 @@ -#undef __WORDSIZE -#define __WORDSIZE 32 #define PT_D1 0 #define PT_D2 1 #define PT_D3 2 diff --git a/arch/m68k/bits/sem.h b/arch/m68k/bits/sem.h index 08faafea..d88338e6 100644 --- a/arch/m68k/bits/sem.h +++ b/arch/m68k/bits/sem.h @@ -1,11 +1,13 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; unsigned short sem_nsems; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/m68k/bits/shm.h b/arch/m68k/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/m68k/bits/shm.h +++ b/arch/m68k/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/m68k/bits/stat.h b/arch/m68k/bits/stat.h index 0f7b66a1..f8768147 100644 --- a/arch/m68k/bits/stat.h +++ b/arch/m68k/bits/stat.h @@ -14,8 +14,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + ino_t st_ino; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - ino_t st_ino; }; diff --git a/arch/m68k/bits/stdint.h b/arch/m68k/bits/stdint.h deleted file mode 100644 index d1b27121..00000000 --- a/arch/m68k/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index fb522b48..5cd84602 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -67,8 +67,8 @@ #define __NR_setrlimit 75 #define __NR_getrlimit 76 #define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 +#define __NR_gettimeofday_time32 78 +#define __NR_settimeofday_time32 79 #define __NR_getgroups 80 #define __NR_setgroups 81 #define __NR_select 82 @@ -235,14 +235,14 @@ #define __NR_remap_file_pages 252 #define __NR_set_tid_address 253 #define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 +#define __NR_timer_settime32 255 +#define __NR_timer_gettime32 256 #define __NR_timer_getoverrun 257 #define __NR_timer_delete 258 -#define __NR_clock_settime 259 -#define __NR_clock_gettime 260 -#define __NR_clock_getres 261 -#define __NR_clock_nanosleep 262 +#define __NR_clock_settime32 259 +#define __NR_clock_gettime32 260 +#define __NR_clock_getres_time32 261 +#define __NR_clock_nanosleep_time32 262 #define __NR_statfs64 263 #define __NR_fstatfs64 264 #define __NR_tgkill 265 @@ -300,8 +300,8 @@ #define __NR_timerfd_create 318 #define __NR_eventfd 319 #define __NR_fallocate 320 -#define __NR_timerfd_settime 321 -#define __NR_timerfd_gettime 322 +#define __NR_timerfd_settime32 321 +#define __NR_timerfd_gettime32 322 #define __NR_signalfd4 323 #define __NR_eventfd2 324 #define __NR_epoll_create1 325 @@ -404,3 +404,20 @@ #define __NR_fsconfig 431 #define __NR_fsmount 432 #define __NR_fspick 433 +#define __NR_pidfd_open 434 +#define __NR_clone3 435 +#define __NR_close_range 436 +#define __NR_openat2 437 +#define __NR_pidfd_getfd 438 +#define __NR_faccessat2 439 +#define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 +#define __NR_process_mrelease 448 +#define __NR_futex_waitv 449 +#define __NR_set_mempolicy_home_node 450 +#define __NR_cachestat 451 +#define __NR_fchmodat2 452 diff --git a/arch/m68k/bits/user.h b/arch/m68k/bits/user.h index 9a4ca128..6a443919 100644 --- a/arch/m68k/bits/user.h +++ b/arch/m68k/bits/user.h @@ -27,6 +27,11 @@ struct user { char u_comm[32]; }; +#define ELF_NGREG 20 +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; +typedef struct user_m68kfp_struct elf_fpregset_t; + #define NBPG 4096 #define UPAGES 1 #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/arch/m68k/pthread_arch.h b/arch/m68k/pthread_arch.h index 02d5b8a0..5bea4e1a 100644 --- a/arch/m68k/pthread_arch.h +++ b/arch/m68k/pthread_arch.h @@ -1,13 +1,12 @@ -static inline struct pthread *__pthread_self() +static inline uintptr_t __get_tp() { - uintptr_t tp = __syscall(SYS_get_thread_area); - return (pthread_t)(tp - 0x7000 - sizeof(struct pthread)); + return __syscall(SYS_get_thread_area); } #define TLS_ABOVE_TP #define GAP_ABOVE_TP 0 -#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) +#define TP_OFFSET 0x7000 #define DTP_OFFSET 0x8000 #define MC_PC gregs[R_PC] diff --git a/arch/m68k/syscall_arch.h b/arch/m68k/syscall_arch.h index af79c306..6a9d0ae8 100644 --- a/arch/m68k/syscall_arch.h +++ b/arch/m68k/syscall_arch.h @@ -87,5 +87,4 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo return d0; } -#define SYSCALL_USE_SOCKETCALL #define SYSCALL_IPC_BROKEN_MODE |