diff options
Diffstat (limited to 'arch/powerpc64')
-rw-r--r-- | arch/powerpc64/bits/alltypes.h.in | 20 | ||||
-rw-r--r-- | arch/powerpc64/bits/endian.h | 5 | ||||
-rw-r--r-- | arch/powerpc64/bits/ioctl.h | 97 | ||||
-rw-r--r-- | arch/powerpc64/bits/ipc.h | 3 | ||||
-rw-r--r-- | arch/powerpc64/bits/limits.h | 7 | ||||
-rw-r--r-- | arch/powerpc64/bits/mman.h | 1 | ||||
-rw-r--r-- | arch/powerpc64/bits/msg.h | 12 | ||||
-rw-r--r-- | arch/powerpc64/bits/ptrace.h | 2 | ||||
-rw-r--r-- | arch/powerpc64/bits/sem.h | 13 | ||||
-rw-r--r-- | arch/powerpc64/bits/shm.h | 1 | ||||
-rw-r--r-- | arch/powerpc64/bits/signal.h | 25 | ||||
-rw-r--r-- | arch/powerpc64/bits/socket.h | 34 | ||||
-rw-r--r-- | arch/powerpc64/bits/syscall.h.in | 38 | ||||
-rw-r--r-- | arch/powerpc64/bits/termios.h | 2 | ||||
-rw-r--r-- | arch/powerpc64/bits/user.h | 10 | ||||
-rw-r--r-- | arch/powerpc64/kstat.h | 19 | ||||
-rw-r--r-- | arch/powerpc64/pthread_arch.h | 10 | ||||
-rw-r--r-- | arch/powerpc64/reloc.h | 3 | ||||
-rw-r--r-- | arch/powerpc64/syscall_arch.h | 3 |
19 files changed, 93 insertions, 212 deletions
diff --git a/arch/powerpc64/bits/alltypes.h.in b/arch/powerpc64/bits/alltypes.h.in index 5b205851..143ffa8d 100644 --- a/arch/powerpc64/bits/alltypes.h.in +++ b/arch/powerpc64/bits/alltypes.h.in @@ -2,8 +2,13 @@ #define _Int64 long #define _Reg long -TYPEDEF __builtin_va_list va_list; -TYPEDEF __builtin_va_list __isoc_va_list; +#if __BIG_ENDIAN__ +#define __BYTE_ORDER 4321 +#else +#define __BYTE_ORDER 1234 +#endif + +#define __LONG_MAX 0x7fffffffffffffffL #ifndef __cplusplus TYPEDEF int wchar_t; @@ -13,14 +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; - -TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; diff --git a/arch/powerpc64/bits/endian.h b/arch/powerpc64/bits/endian.h deleted file mode 100644 index 2016cb20..00000000 --- a/arch/powerpc64/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if __BIG_ENDIAN__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif diff --git a/arch/powerpc64/bits/ioctl.h b/arch/powerpc64/bits/ioctl.h index 47586234..b6cbb18f 100644 --- a/arch/powerpc64/bits/ioctl.h +++ b/arch/powerpc64/bits/ioctl.h @@ -78,14 +78,6 @@ #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TIOCPKT 0x5420 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 #define TIOCNOTTY 0x5422 #define TIOCSETD 0x5423 @@ -113,38 +105,12 @@ #define TIOCSLCKTRMIOS 0x5457 #define TIOCSERGSTRUCT 0x5458 #define TIOCSERGETLSR 0x5459 -#define TIOCSER_TEMT 0x01 #define TIOCSERGETMULTI 0x545A #define TIOCSERSETMULTI 0x545B #define TIOCMIWAIT 0x545C #define TIOCGICOUNT 0x545D - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 @@ -152,66 +118,3 @@ struct winsize { #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 #define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 diff --git a/arch/powerpc64/bits/ipc.h b/arch/powerpc64/bits/ipc.h index 3f2ede07..a388d56b 100644 --- a/arch/powerpc64/bits/ipc.h +++ b/arch/powerpc64/bits/ipc.h @@ -10,6 +10,3 @@ struct ipc_perm { long long __pad2; long long __pad3; }; - -#define IPC_64 0x100 - diff --git a/arch/powerpc64/bits/limits.h b/arch/powerpc64/bits/limits.h deleted file mode 100644 index 0226588c..00000000 --- a/arch/powerpc64/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 64 -#endif - -#define LONG_MAX 0x7fffffffffffffffL -#define LLONG_MAX 0x7fffffffffffffffLL diff --git a/arch/powerpc64/bits/mman.h b/arch/powerpc64/bits/mman.h index b3a675a8..95ec4358 100644 --- a/arch/powerpc64/bits/mman.h +++ b/arch/powerpc64/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/powerpc64/bits/msg.h b/arch/powerpc64/bits/msg.h deleted file mode 100644 index 2e23ca27..00000000 --- a/arch/powerpc64/bits/msg.h +++ /dev/null @@ -1,12 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - time_t msg_stime; - time_t msg_rtime; - time_t msg_ctime; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; diff --git a/arch/powerpc64/bits/ptrace.h b/arch/powerpc64/bits/ptrace.h index 75086ca0..303a0735 100644 --- a/arch/powerpc64/bits/ptrace.h +++ b/arch/powerpc64/bits/ptrace.h @@ -8,6 +8,8 @@ #define PTRACE_SET_DEBUGREG 0x1a #define PTRACE_GETVSRREGS 0x1b #define PTRACE_SETVSRREGS 0x1c +#define PTRACE_SYSEMU 0x1d +#define PTRACE_SYSEMU_SINGLESTEP 0x1e #define PTRACE_SINGLEBLOCK 0x100 #define PT_GETVRREGS PTRACE_GETVRREGS diff --git a/arch/powerpc64/bits/sem.h b/arch/powerpc64/bits/sem.h deleted file mode 100644 index 558184db..00000000 --- a/arch/powerpc64/bits/sem.h +++ /dev/null @@ -1,13 +0,0 @@ -#include <endian.h> - -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned short __pad[3], sem_nsems; -#else - unsigned short sem_nsems, __pad[3]; -#endif - unsigned long __unused[2]; -}; diff --git a/arch/powerpc64/bits/shm.h b/arch/powerpc64/bits/shm.h index 8108c3a8..b7f73a8d 100644 --- a/arch/powerpc64/bits/shm.h +++ b/arch/powerpc64/bits/shm.h @@ -21,4 +21,3 @@ struct shm_info { unsigned long shm_tot, shm_rss, shm_swp; unsigned long __swap_attempts, __swap_successes; }; - diff --git a/arch/powerpc64/bits/signal.h b/arch/powerpc64/bits/signal.h index 34693a68..d5493b18 100644 --- a/arch/powerpc64/bits/signal.h +++ b/arch/powerpc64/bits/signal.h @@ -9,18 +9,21 @@ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) typedef unsigned long greg_t, gregset_t[48]; +typedef double fpregset_t[33]; typedef struct { - double fpregs[32]; - double fpscr; -} fpregset_t; - -typedef struct { - unsigned __int128 vrregs[32]; - unsigned _pad[3]; - unsigned vrsave; - unsigned vscr; - unsigned _pad2[3]; +#ifdef __GNUC__ + __attribute__((__aligned__(16))) +#endif + unsigned vrregs[32][4]; + struct { +#if __BIG_ENDIAN__ + unsigned _pad[3], vscr_word; +#else + unsigned vscr_word, _pad[3]; +#endif + } vscr; + unsigned vrsave, _pad[3]; } vrregset_t; typedef struct sigcontext { @@ -29,7 +32,7 @@ typedef struct sigcontext { int _pad0; unsigned long handler; unsigned long oldmask; - void *regs; + struct pt_regs *regs; gregset_t gp_regs; fpregset_t fp_regs; vrregset_t *v_regs; diff --git a/arch/powerpc64/bits/socket.h b/arch/powerpc64/bits/socket.h index 0f3c9aac..557e324f 100644 --- a/arch/powerpc64/bits/socket.h +++ b/arch/powerpc64/bits/socket.h @@ -1,37 +1,3 @@ -#include <endian.h> - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else - int msg_iovlen, __pad1; -#endif - void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else - socklen_t msg_controllen; - int __pad2; -#endif - int msg_flags; -}; - -struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else - socklen_t cmsg_len; - int __pad1; -#endif - int cmsg_level; - int cmsg_type; -}; - #define SO_DEBUG 1 #define SO_REUSEADDR 2 #define SO_TYPE 3 diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in index 4e29cedf..43551079 100644 --- a/arch/powerpc64/bits/syscall.h.in +++ b/arch/powerpc64/bits/syscall.h.in @@ -364,4 +364,42 @@ #define __NR_pkey_mprotect 386 #define __NR_rseq 387 #define __NR_io_pgetevents 388 +#define __NR_semtimedop 392 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#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/powerpc64/bits/termios.h b/arch/powerpc64/bits/termios.h index e3f22e86..da1f406b 100644 --- a/arch/powerpc64/bits/termios.h +++ b/arch/powerpc64/bits/termios.h @@ -167,5 +167,5 @@ struct termios { #define EXTPROC 0x10000000 #define XTABS 00006000 -#define TIOCSER_TEMT 0x01 +#define TIOCSER_TEMT 1 #endif diff --git a/arch/powerpc64/bits/user.h b/arch/powerpc64/bits/user.h index 7ca459b3..7e75d201 100644 --- a/arch/powerpc64/bits/user.h +++ b/arch/powerpc64/bits/user.h @@ -1,10 +1,8 @@ -struct pt_regs { - unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, softe; - unsigned long trap, dar, dsisr, result; -}; - struct user { - struct pt_regs regs; + struct { + unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, softe; + unsigned long trap, dar, dsisr, result; + } regs; unsigned long u_tsize, u_dsize, u_ssize; unsigned long start_code, start_data, start_stack; long signal; diff --git a/arch/powerpc64/kstat.h b/arch/powerpc64/kstat.h new file mode 100644 index 00000000..887b3e26 --- /dev/null +++ b/arch/powerpc64/kstat.h @@ -0,0 +1,19 @@ +struct kstat { + dev_t st_dev; + ino_t st_ino; + nlink_t st_nlink; + mode_t st_mode; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + off_t st_size; + blksize_t st_blksize; + blkcnt_t st_blocks; + long st_atime_sec; + long st_atime_nsec; + long st_mtime_sec; + long st_mtime_nsec; + long st_ctime_sec; + long st_ctime_nsec; + unsigned long __unused[3]; +}; diff --git a/arch/powerpc64/pthread_arch.h b/arch/powerpc64/pthread_arch.h index 79c3ecd8..1b7b9079 100644 --- a/arch/powerpc64/pthread_arch.h +++ b/arch/powerpc64/pthread_arch.h @@ -1,18 +1,16 @@ -static inline struct pthread *__pthread_self() +static inline uintptr_t __get_tp() { - register char *tp __asm__("r13"); + register uintptr_t tp __asm__("r13"); __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 gp_regs[32] - -#define CANARY canary_at_end diff --git a/arch/powerpc64/reloc.h b/arch/powerpc64/reloc.h index faf70acd..2f1bba05 100644 --- a/arch/powerpc64/reloc.h +++ b/arch/powerpc64/reloc.h @@ -1,5 +1,3 @@ -#include <endian.h> - #if __BYTE_ORDER == __LITTLE_ENDIAN #define ENDIAN_SUFFIX "le" #else @@ -11,6 +9,7 @@ #define TPOFF_K (-0x7000) #define REL_SYMBOLIC R_PPC64_ADDR64 +#define REL_USYMBOLIC R_PPC64_UADDR64 #define REL_GOT R_PPC64_GLOB_DAT #define REL_PLT R_PPC64_JMP_SLOT #define REL_RELATIVE R_PPC64_RELATIVE diff --git a/arch/powerpc64/syscall_arch.h b/arch/powerpc64/syscall_arch.h index 1e730625..76b4e335 100644 --- a/arch/powerpc64/syscall_arch.h +++ b/arch/powerpc64/syscall_arch.h @@ -85,3 +85,6 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo :: "memory", "cr0", "r9", "r10", "r11", "r12"); return r3; } + +#define SO_RCVTIMEO_OLD 18 +#define SO_SNDTIMEO_OLD 19 |