diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/arch.mak | 1 | ||||
-rw-r--r-- | arch/powerpc/bits/alltypes.h.in | 4 | ||||
-rw-r--r-- | arch/powerpc/bits/fenv.h | 2 | ||||
-rw-r--r-- | arch/powerpc/bits/ioctl.h | 4 | ||||
-rw-r--r-- | arch/powerpc/bits/ipcstat.h | 2 | ||||
-rw-r--r-- | arch/powerpc/bits/mman.h | 1 | ||||
-rw-r--r-- | arch/powerpc/bits/msg.h | 15 | ||||
-rw-r--r-- | arch/powerpc/bits/posix.h | 2 | ||||
-rw-r--r-- | arch/powerpc/bits/reg.h | 3 | ||||
-rw-r--r-- | arch/powerpc/bits/sem.h | 10 | ||||
-rw-r--r-- | arch/powerpc/bits/shm.h | 18 | ||||
-rw-r--r-- | arch/powerpc/bits/socket.h | 18 | ||||
-rw-r--r-- | arch/powerpc/bits/stat.h | 6 | ||||
-rw-r--r-- | arch/powerpc/bits/stdint.h | 20 | ||||
-rw-r--r-- | arch/powerpc/bits/syscall.h.in | 37 | ||||
-rw-r--r-- | arch/powerpc/pthread_arch.h | 10 | ||||
-rw-r--r-- | arch/powerpc/reloc.h | 2 |
17 files changed, 68 insertions, 87 deletions
diff --git a/arch/powerpc/arch.mak b/arch/powerpc/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/powerpc/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/powerpc/bits/alltypes.h.in b/arch/powerpc/bits/alltypes.h.in index fd0c816c..b48df6a6 100644 --- a/arch/powerpc/bits/alltypes.h.in +++ b/arch/powerpc/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -17,6 +18,3 @@ TYPEDEF float float_t; TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; - -TYPEDEF long time_t; -TYPEDEF long suseconds_t; diff --git a/arch/powerpc/bits/fenv.h b/arch/powerpc/bits/fenv.h index c5a3e5c5..5b15c69a 100644 --- a/arch/powerpc/bits/fenv.h +++ b/arch/powerpc/bits/fenv.h @@ -1,4 +1,4 @@ -#ifdef _SOFT_FLOAT +#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) #define FE_ALL_EXCEPT 0 #define FE_TONEAREST 0 #else diff --git a/arch/powerpc/bits/ioctl.h b/arch/powerpc/bits/ioctl.h index b6cbb18f..ac9bfd20 100644 --- a/arch/powerpc/bits/ioctl.h +++ b/arch/powerpc/bits/ioctl.h @@ -116,5 +116,5 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/powerpc/bits/ipcstat.h b/arch/powerpc/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/powerpc/bits/ipcstat.h +++ b/arch/powerpc/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/powerpc/bits/mman.h b/arch/powerpc/bits/mman.h index b3a675a8..95ec4358 100644 --- a/arch/powerpc/bits/mman.h +++ b/arch/powerpc/bits/mman.h @@ -4,7 +4,6 @@ #define MAP_NORESERVE 0x40 #undef MAP_LOCKED #define MAP_LOCKED 0x80 -#undef MAP_SYNC #undef MCL_CURRENT #define MCL_CURRENT 0x2000 diff --git a/arch/powerpc/bits/msg.h b/arch/powerpc/bits/msg.h index 171c11a3..9fb15dcc 100644 --- a/arch/powerpc/bits/msg.h +++ b/arch/powerpc/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - int __unused1; - time_t msg_stime; - int __unused2; - time_t msg_rtime; - int __unused3; - time_t msg_ctime; + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; 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/powerpc/bits/posix.h b/arch/powerpc/bits/posix.h deleted file mode 100644 index 30a38714..00000000 --- a/arch/powerpc/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/powerpc/bits/reg.h b/arch/powerpc/bits/reg.h deleted file mode 100644 index 0c7bffca..00000000 --- a/arch/powerpc/bits/reg.h +++ /dev/null @@ -1,3 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 32 -/* FIXME */ diff --git a/arch/powerpc/bits/sem.h b/arch/powerpc/bits/sem.h index bc2d6d1f..28be4845 100644 --- a/arch/powerpc/bits/sem.h +++ b/arch/powerpc/bits/sem.h @@ -1,10 +1,12 @@ struct semid_ds { struct ipc_perm sem_perm; - int __unused1; - time_t sem_otime; - int __unused2; - time_t sem_ctime; + unsigned long __sem_otime_hi; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_hi; + unsigned long __sem_ctime_lo; unsigned short __sem_nsems_pad, sem_nsems; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/powerpc/bits/shm.h b/arch/powerpc/bits/shm.h index b19801d5..7f1ca17e 100644 --- a/arch/powerpc/bits/shm.h +++ b/arch/powerpc/bits/shm.h @@ -2,19 +2,21 @@ struct shmid_ds { struct ipc_perm shm_perm; - int __unused1; - time_t shm_atime; - int __unused2; - time_t shm_dtime; - int __unused3; - time_t shm_ctime; - int __unused4; + unsigned long __shm_atime_hi; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_hi; + unsigned long __shm_ctime_lo; + unsigned long __pad1; size_t shm_segsz; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; - unsigned long __pad1; unsigned long __pad2; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/powerpc/bits/socket.h b/arch/powerpc/bits/socket.h index a94b8bdb..b19ed42b 100644 --- a/arch/powerpc/bits/socket.h +++ b/arch/powerpc/bits/socket.h @@ -1,19 +1,3 @@ -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - int msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; -}; - -struct cmsghdr { - socklen_t cmsg_len; - int cmsg_level; - int cmsg_type; -}; - #define SO_DEBUG 1 #define SO_REUSEADDR 2 #define SO_TYPE 3 @@ -31,8 +15,6 @@ struct cmsghdr { #define SO_REUSEPORT 15 #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 -#define SO_RCVTIMEO 18 -#define SO_SNDTIMEO 19 #define SO_PASSCRED 20 #define SO_PEERCRED 21 #define SO_ACCEPTCONN 30 diff --git a/arch/powerpc/bits/stat.h b/arch/powerpc/bits/stat.h index dcb896fd..585d98e9 100644 --- a/arch/powerpc/bits/stat.h +++ b/arch/powerpc/bits/stat.h @@ -13,8 +13,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; + unsigned __unused[2]; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - unsigned __unused[2]; }; diff --git a/arch/powerpc/bits/stdint.h b/arch/powerpc/bits/stdint.h deleted file mode 100644 index d1b27121..00000000 --- a/arch/powerpc/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/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index adcf63db..ea95f3ed 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -76,8 +76,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 @@ -238,14 +238,14 @@ #define __NR_epoll_wait 238 #define __NR_remap_file_pages 239 #define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 +#define __NR_timer_settime32 241 +#define __NR_timer_gettime32 242 #define __NR_timer_getoverrun 243 #define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 +#define __NR_clock_settime32 245 +#define __NR_clock_gettime32 246 +#define __NR_clock_getres_time32 247 +#define __NR_clock_nanosleep_time32 248 #define __NR_swapcontext 249 #define __NR_tgkill 250 #define __NR_utimes 251 @@ -307,8 +307,8 @@ #define __NR_sync_file_range2 308 #define __NR_fallocate 309 #define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 +#define __NR_timerfd_settime32 311 +#define __NR_timerfd_gettime32 312 #define __NR_signalfd4 313 #define __NR_eventfd2 314 #define __NR_epoll_create1 315 @@ -413,4 +413,21 @@ #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/powerpc/pthread_arch.h b/arch/powerpc/pthread_arch.h index ae0f28d6..42e88b07 100644 --- a/arch/powerpc/pthread_arch.h +++ b/arch/powerpc/pthread_arch.h @@ -1,18 +1,16 @@ -static inline struct pthread *__pthread_self() +static inline uintptr_t __get_tp() { - register char *tp __asm__("r2"); + register uintptr_t tp __asm__("r2"); __asm__ ("" : "=r" (tp) ); - return (pthread_t)(tp - 0x7000 - sizeof(struct pthread)); + return tp; } #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 // the kernel calls the ip "nip", it's the first saved value after the 32 // GPRs. #define MC_PC gregs[32] - -#define CANARY canary_at_end diff --git a/arch/powerpc/reloc.h b/arch/powerpc/reloc.h index 527b6b7c..fdfbf827 100644 --- a/arch/powerpc/reloc.h +++ b/arch/powerpc/reloc.h @@ -1,4 +1,4 @@ -#ifdef _SOFT_FLOAT +#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) #define FP_SUFFIX "-sf" #else #define FP_SUFFIX "" |