about summary refs log tree commit diff
path: root/arch/mips64
Commit message (Collapse)AuthorAgeFilesLines
...
* add io_pgetevents and rseq syscall numbers from linux v4.18Szabolcs Nagy2018-12-091-0/+2
| | | | | | | | io_pgetevents is new in linux commit 7a074e96dee62586c935c80cecd931431bfdd0be rseq is new in linux commit d7822b1e24f2df5df98c76f0e94a5416349ff759
* make thread-pointer-loading asm non-volatileRich Felker2018-10-161-2/+2
| | | | | | | | | | this will allow the compiler to cache and reuse the result, meaning we no longer have to take care not to load it more than once for the sake of archs where the load may be expensive. depends on commit 1c84c99913bf1cd47b866ed31e665848a0da84a2 for correctness, since otherwise the compiler could hoist loads during stage 3 of dynamic linking before the initial thread-pointer setup.
* apply hidden visibility to sigreturn code fragmentsRich Felker2018-09-121-1/+3
| | | | | | | these were overlooked in the declarations overhaul work because they are not properly declared, and the current framework even allows their declared types to vary by arch. at some point this should be cleaned up, but I'm not sure what the right way would be.
* add support for arch-specific ptrace command macrosSzabolcs Nagy2018-07-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | sys/ptrace.h is target specific, use bits/ptrace.h to add target specific macro definitions. these macros are kept in the generic sys/ptrace.h even though some targets don't support them: PTRACE_GETREGS PTRACE_SETREGS PTRACE_GETFPREGS PTRACE_SETFPREGS PTRACE_GETFPXREGS PTRACE_SETFPXREGS so no macro definition got removed in this patch on any target. only s390x has a numerically conflicting macro definition (PTRACE_SINGLEBLOCK). the PT_ aliases follow glibc headers, otherwise the definitions come from linux uapi headers except ones that are skipped in glibc and there is no real kernel support (s390x PTRACE_*_AREA) or need special type definitions (mips PTRACE_*_WATCH_*) or only relevant for linux 2.4 compatibility (PTRACE_OLDSETOPTIONS).
* fix value of SO_PEERSEC on mips archsRich Felker2018-06-261-0/+1
| | | | adapted from patch by Matthias Schiffer.
* mips: add HWCAP_ flags from linux v4.17Szabolcs Nagy2018-06-191-0/+1
| | | | new in linux commit 256211f2b0b251e532d1899b115e374feb16fa7a
* fix TLS layout of TLS variant I when there is a gap above TPSzabolcs Nagy2018-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In TLS variant I the TLS is above TP (or above a fixed offset from TP) but on some targets there is a reserved gap above TP before TLS starts. This matters for the local-exec tls access model when the offsets of TLS variables from the TP are hard coded by the linker into the executable, so the libc must compute these offsets the same way as the linker. The tls offset of the main module has to be alignup(GAP_ABOVE_TP, main_tls_align). If there is no TLS in the main module then the gap can be ignored since musl does not use it and the tls access models of shared libraries are not affected. The previous setup only worked if (tls_align & -GAP_ABOVE_TP) == 0 (i.e. TLS did not require large alignment) because the gap was treated as a fixed offset from TP. Now the TP points at the end of the pthread struct (which is aligned) and there is a gap above it (which may also need alignment). The fix required changing TP_ADJ and __pthread_self on affected targets (aarch64, arm and sh) and in the tlsdesc asm the offset to access the dtv changed too.
* fix minor namespace issues in termios.hRich Felker2018-03-101-0/+2
| | | | | | | | | | the output delay features (NL*, CR*, TAB*, BS*, and VT*) are XSI-shaded. VT* is in the V* namespace reservation but the rest need to be suppressed in base POSIX namespace. unfortunately this change introduces feature test macro checks into another bits header. at some point these checks should be simplified by having features.h handle the "FTM X implies Y" relationships.
* add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15Szabolcs Nagy2018-02-221-0/+1
| | | | | | | | for synchronous page faults, new in linux commit 1c9725974074a047f6080eecc62c50a8e840d050 and b6fb293f2497a9841d94f6b57bd2bb2cd222da43 note that only targets that use asm-generic/mman.h have this new flag defined, so undef it on other targets (mips*, powerpc*).
* mips,powerpc: fix TIOCSER_TEMT in termios.hSzabolcs Nagy2018-02-221-1/+1
| | | | | | use the same token to define TIOCSER_TEMT as is used in ioctl.h so when both headers are included there are no redefinition warnings during musl build.
* ioctl TIOCGPTPEER from linux v4.13Szabolcs Nagy2017-11-051-0/+1
| | | | | added for safe opening of peer end of pty in a mount namespace. new in linux commit c6325179238f1d4683edbec53d8322575d76d7e2
* add statx syscall numbers from linux v4.11Szabolcs Nagy2017-11-051-0/+1
| | | | | statx was added in linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (there is no libc wrapper yet and microblaze and sh misses the number).
* add SIOCGSTAMPNS socket ioctl macro to ioctl.hSzabolcs Nagy2017-08-291-0/+1
| | | | | | | | | | it is defined in linux asm/sockios.h since commit ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (linux v2.6.22) but was missing from musl by accident. in musl the sockios macros are exposed in sys/ioctl.h together with other ioctl requests instead of in sys/socket.h because of namespace rules. (glibc has them in sys/socket.h under _GNU_SOURCE.)
* fix mips ioctl macros to match linux asm/sockios.hSzabolcs Nagy2017-08-291-5/+5
|
* remove long-obsolete clang workarounds from mips* syscall_arch.h filesRich Felker2017-05-311-75/+0
| | | | | | | at one point, clang reportedly failed to support the asm register constraints needed for inline syscalls. versions of clang that old have much bigger problems that preclude using them to compile musl libc.
* fix fstatat syscall on mips64Rich Felker2017-05-311-3/+22
| | | | | | | mips64 requires 'struct stat' conversion due to incorrect 32-bit fields where time_t should be in the kernel version of the structure. syscall_arch.h already performed the correct translation for stat, fstat, and lstat syscalls, but omitted special handling for fstatat.
* add pkey_{mprotect,alloc,free} syscalls from linux v4.9Szabolcs Nagy2016-12-291-0/+3
| | | | | see linux commit e8c24d3a23a469f1f40d4de24d872ca7023ced0a and linux Documentation/x86/protection-keys.txt
* add bits/hwcap.h and include it in sys/auxv.hSzabolcs Nagy2016-10-201-0/+2
| | | | | | | | | aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h it seems the mips hwcaps were never exposed to userspace neither by linux nor by glibc, but that's most likely an oversight.
* fix regression in tcsetattr on all mips archsRich Felker2016-07-131-3/+3
| | | | | revert commit 8c316e9e49d37ad92c2e7493e16166a2afca419f. it was wrong and does not match how the kernel API works.
* fix TCS* definitions in mips termios.hSzabolcs Nagy2016-07-031-3/+3
| | | | these were incorrectly using the generic definitions.
* fix mips termios.h macro exposure/namespace issuesSzabolcs Nagy2016-07-031-15/+14
| | | | same changes to the defined macros as in powerpc and generic bits.
* fix TIOCMSET in mips ioctl.hSzabolcs Nagy2016-07-031-1/+1
| | | | it seems it was a typo.
* fix mips, mips64, mipsn32 TIOCM_* macros in ioctl.hSzabolcs Nagy2016-07-031-14/+14
| | | | | TIOCM_ macros were wrongly using the asm-generic/termios.h definitions instead of the mips specific ones from asm/termios.h
* remove mips and powerpc ioctls that are missing from linux uapiSzabolcs Nagy2016-07-031-5/+0
| | | | | | mips and powerpc use their own asm/ioctls.h, not the asm-generic/ioctls.h and they lack termiox macros that are available on other targets. see kernel commit 1d65b4a088de407e99714fdc27862449db04fb5c
* add missing TIOC* macros to ioctl.hSzabolcs Nagy2016-07-031-0/+8
| | | | | these are defined in linux asm/ioctls.h. (powerpc64 and powerpc bits/ioctl.h are now identical)
* add missing SIOCSIFNAME from linux/sockios.h to ioctl.hSzabolcs Nagy2016-07-031-0/+1
| | | | glibc ioctl.h has it too.
* remove ioctl macros that were removed from linux uapiSzabolcs Nagy2016-07-031-4/+0
| | | | | TIOCTTYGSTRUCT, TIOCGHAYESESP, TIOCSHAYESESP and TIOCM_MODEM_BITS were removed from the linux uapi and not present in glibc ioctl.h
* add consistent reserved fields in mips64/n32 termios structuresRich Felker2016-07-031-0/+2
| | | | | | | | | | | | | | | | | | the (unused) speed fields were omitted when these ports were first added (within this release cycle, so not present in any release yet) in accordance with how glibc defines the structure on mips archs. however their omission does not match existing musl practice/intent. glibc provides its own, mostly-unified termios structure definition and performs translation in userspace to match the kernel structure for the arch, but has gratuitous differences on a few archs like mips, presumably as a result of historical mistakes. some other libcs use the kernel definitions directly. musl essentially does that, by matching the kernel layout in the part of the structure the kernel will read/write, but leaves additional space at the end for extensibility. these are nominally the (nonstandard) speed fields and (on most archs) extra c_cc elements, but since they are not used they could be repurposed if there's ever a need.
* add preadv2 and pwritev2 syscall numbers for linux v4.6Szabolcs Nagy2016-06-091-0/+2
| | | | | | | | the syscalls take an additional flag argument, they were added in commit f17d8b35452cab31a70d224964cd583fb2845449 and a RWF_HIPRI priority hint flag was added to linux/fs.h in 97be7ebe53915af504fb491fb99f064c7cf3cb09. the syscall is not allocated for microblaze and sh yet.
* deduplicate __NR_* and SYS_* syscall number definitionsBobby Bingham2016-05-121-320/+0
|
* add support for mips and mips64 r6 isaRich Felker2016-04-033-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | mips32r6 and mips64r6 are actually new isas at both the asm source and opcode levels (pre-r6 code cannot run on r6) and thus need to be treated as a new subarch. the following changes are made, some of which yield code generation improvements for non-r6 targets too: - add subarch logic in configure script and reloc.h files for dynamic linker name. - suppress use of .set mips2 asm directives (used to allow mips2 atomic instructions on baseline mips1 builds; the kernel has to emulate them on mips1) except when actually needed. they cause wrong instruction encodings on r6, and pessimize inlining on at least some compilers. - only hard-code sync instruction encoding on mips1. - use "ZC" constraint instead of "m" constraint for llsc memory operands on r6, where the ll/sc instructions no longer accept full 16-bit offsets. - only hard-code rdhwr instruction encoding with .word on targets (pre-r2) where it may need trap-and-emulate by the kernel. otherwise, just use the instruction mnemonic, and allow an arbitrary destination register to be used.
* add copy_file_range syscall numbers from linux v4.5Szabolcs Nagy2016-03-191-0/+2
| | | | | | | it was introduced for offloading copying between regular files in linux commit 29732938a6289a15e907da234d6692a2ead71855 (microblaze and sh does not yet have the syscall number.)
* mips64: add recent linux syscall numbersSzabolcs Nagy2016-03-191-0/+6
| | | | add userfaultfd, membarrier and mlock2 system call numbers.
* deduplicate bits/mman.hSzabolcs Nagy2016-03-181-45/+11
| | | | | | | | | | | currently five targets use the same mman.h constants and the rest share most constants too, so move them to sys/mman.h before the bits/mman.h include where the differences can be corrected by redefinition of the macros. this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most targets (it should be the same as MADV_DONTNEED), and sh defined the x86-only MAP_32BIT mmap flag.
* correct pointer types for a_ll_p and a_sc_p primitives on mips64Rich Felker2016-03-111-4/+4
| | | | | | | | these changes should not affect generated code, but they reflect that the underlying objects operated on by a_cas_p are supposed to have type volatile void *, not volatile long. in theory a compiler could treat the effective type mismatch in the "m" memory operands as undefined behavior.
* make mips64 a_sc_p atomic primitive's asm constraints work with clangRich Felker2016-03-111-1/+1
| | | | | | | apparently clang does not accept matching-register input and output constraints that differ in size (32-bit vs 64-bit). based on patch by Jaydeep Patil.
* add mips64 portRich Felker2016-03-0632-0/+2171
patch by Mahesh Bodapati and Jaydeep Patil of Imagination Technologies.