about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
...
* linux: Add ppoll time64 optimizationAdhemerval Zanella2020-09-111-5/+13
| | | | | | | | | | It avoid continuing issue the __NR_ppoll_time64 syscall once the kernel advertise it does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
* linux: Simplify clock_getresAdhemerval Zanella2020-09-111-23/+15
| | | | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_clock_getres or __NR_clock_getres_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. It also uses the time64-support functions to simplify it further. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
* Update sparc libm-test-ulpsAdhemerval Zanella2020-09-111-1/+1
|
* Remove internal usage of extensible stat functionsAdhemerval Zanella2020-09-1122-35/+34
| | | | | | | | | | | | It replaces the internal usage of __{f,l}xstat{at}{64} with the __{f,l}stat{at}{64}. It should not change the generate code since sys/stat.h explicit defines redirections to internal calls back to xstat* symbols. Checked with a build for all affected ABIs. I also check on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Linux: Consolidate xmknodAdhemerval Zanella2020-09-112-59/+3
| | | | | | | | | The __NR_mknodat syscall is supported on all kernels, so the generic implementation is used as default. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Consolidate fxstatat{64}Adhemerval Zanella2020-09-1123-301/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LFS support is implemented on fxstat64.c, instead of fxstat.c for 64-bit architectures. The fxstatat.c implements the non-LFS and it is a no-op for !XSTAT_IS_XSTAT64. The generic non-LFS implementation handles two cases: 1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios): it issues __NR_fstatat64 plus handle the overflow on st_ino, st_size, or st_blocks. It only handles _STAT_VER_KERNEL. 2. Old kABIs with old non-LFS support (arm, i386, hppa, m68k, mips32, microblaze, s390, sh, powerpc, and sparc32). it issues __NR_fstatat64 and convert to non-LFS stat struct based on the version. Also non-LFS mips64 is an outlier and it has its own implementation since _STAT_VER_LINUX requires a different conversion function (it uses the kernel_stat as the sysissues argument since its exported ABI is different than the kernel one for both non-LFS and LFS implementation). The generic LFS implementation handles multiple cases: 1. XSTAT_IS_XSTAT64 being 1: 1.1. 64-bit kABI (aarch64, ia64, powerpc64*, s390x, riscv64, and x86_64): it issues __NR_newfstatat for _STAT_VER_KERNEL or _STAT_VER_LINUX. 1.2. 64-bit kABI outlier (sparc64): it issuess fstatat64 with a temporary stat64 and convert to output stat64 based on the input version (and using a sparc64 specific __xstat32_conv). 1.3. New 32-bit kABIs with only 64-bit time_t support (arc and riscv32): it issues __NR_statx and covert to struct stat64. 2. Old ABIs with XSTAT_IS_XSTAT64 being 0 (arm, csky, i386, hppa, m68k, microblaze, mips32, nios2, sh, powerpc32, and sparc32): it issues __NR_fstat64. Also, two special cases requires specific implementations: 1. alpha: it uses the __NR_fstatat64 syscall instead. 2. mips64: as for non-LFS implementation its ABIs differ from glibc exported one, which requires an specific conversion function to handle the kernel_stat. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Consolidate fxstat{64}Adhemerval Zanella2020-09-1118-268/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LFS support is implemented on fxstat64.c, instead of fxstat.c for 64-bit architectures. The fxstat.c implements the non-LFS and it is a no-op for !XSTAT_IS_XSTAT64. The generic non-LFS implementation handles two cases: 1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios): it issuess __NR_fstat64 plus handle the overflow on st_ino, st_size, or st_blocks. It only handles _STAT_VER_KERNEL. 2. Old KABIs with old non-LFS support (arm, i386, hppa, m68k, microblaze, s390, sh, powerpc, and sparc32). For _STAT_VER_KERNEL it issues __NR_fstat, otherwise it calls __NR_fstat64 and convert to non-LFS stat struct and handle possible overflows on st_ino, st_size, or st_blocks. Also non-LFS mips is an outlier and it has its own implementation since _STAT_VER_LINUX requires a different conversion function (it uses the kernel_stat as the sysissues argument since its exported ABI is different than the kernel one for both non-LFS and LFS implementation). The generic LFS implementation handles multiple cases: 1. XSTAT_IS_XSTAT64 being 1: 1.1. 64-bit kABI (aarch64, ia64, powerpc64*, s390x, riscv64, and x86_64): it issuess __NR_fstat for _STAT_VER_KERNEL or _STAT_VER_LINUX. 1.2. Old 64-bit kABI with defines __NR_fstat64 instead of __NR_fstat (sparc64): it issues __NR_fstat for _STAT_VER_KERNEL or __NR_fstat64 and convert to struct stat64. 1.3. New 32-bit kABIs with only 64-bit time_t support (arc and riscv32): it issuess __NR_statx and covert to struct stat64. 2. Old ABIs with XSTAT_IS_XSTAT64 being 0 (arm, csky, i386, hppa, m68k, microblaze, mips32, nios2, sh, powerpc32, and sparc32): it issues __NR_fstat64. Also, two special cases requires specific implementations: 1. alpha: it requires to handle _STAT_VER_KERNEL64 to issues __NR_fstat64 and use the kernel_stat with __NR_fstat otherwise. 2. mips64: as for non-LFS implementation its ABIs differ from glibc exported one, which requires an specific conversion function to handle the kernel_stat. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Consolidate lxstat{64}Adhemerval Zanella2020-09-1119-345/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LFS support is implemented on lxstat64.c, instead of lxstat.c for 64-bit architectures. The xstat.c implements the non-LFS and it is a no-op for !XSTAT_IS_XSTAT64. The generic non-LFS implementation handles two cases: 1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios): it issues __NR_fstat64 with AT_SYMLINK_NOFOLLOW plus handles the possible overflow off st_ino, st_size, or st_blocks. It only handles _STAT_VER_KERNEL. 2. Old KABIs with old non-LFS support (arm, i386, hppa, m68k, microblaze, s390, sh, powerpc, and sparc32). For _STAT_VER_KERNEL it issues __NR_lstat, otherwise it isseus __NR_lstat64 and convert to non-LFS stat struct and handle possible overflows on st_ino, st_size, or st_blocks. Also non-LFS mips is an outlier and it has its own implementation since _STAT_VER_LINUX requires a different conversion function (it uses the kernel_stat as the syscall argument since its exported ABI is different than the kernel one for both non-LFS and LFS implementation). The generic LFS implementation handles multiple cases: 1. XSTAT_IS_XSTAT64 being 1: 1.1. Old 64-bit kABI (ia64, powerpc64*, s390x, sparc64, x86_64): it issues __NR_lstat for _STAT_VER_KERNEL or _STAT_VER_LINUX. 1.2. Old 64-bit kABI with defines __NR_lstat64 instead of __NR_lstat (sparc64): it issues __NR_lstat for _STAT_VER_KERNEL or __NR_lstat64 and convert to struct stat64. 1.3. New kABIs which uses generic 64-bit Linux ABI (aarch64 and riscv64): it issues __NR_newfstatat with AT_SYMLINK_NOFOLLOW and only for _STAT_VER_KERNEL. 1.4. New 32-bit kABIs with only 64-bit time_t support (arc and riscv32): it issues __NR_statx and covert to struct stat64. 2. Old ABIs with XSTAT_IS_XSTAT64 being 0: 2.1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios2): it issues __NR_fstatat64 for _STAT_VER_KERNEL. 2.2. Old kABIs with old non-LFS support (arm, i386, hppa, m68k, microblaze, s390, sh, mips32, powerpc32, and sparc32): it issues __NR_lstat64. Also, two special cases requires specific LFS implementations: 1. alpha: it requires to handle _STAT_VER_KERNEL64 to issue __NR_lstat64 and use the kernel_stat with __NR_lstat otherwise. 2. mips64: as for non-LFS implementation its ABIs differ from glibc exported one, which requires a specific conversion function to handle the kernel_stat. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Consolidate xstat{64}Adhemerval Zanella2020-09-1120-332/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LFS support is implemented on xstat64.c, instead of xstat.c for 64-bit architectures. The xstat.c implements the non-LFS it is no-op for !XSTAT_IS_XSTAT64. The generic non-LFS implementation handle two cases: 1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios): it issues __NR_fstat64 plus handle the overflow on st_ino, st_size, or st_blocks. It only handles _STAT_VER_KERNEL. 2. Old KABIs with old non-LFS support (arm, i386, hppa, m68k, microblaze, s390, sh, powerpc, and sparc32). For _STAT_VER_KERNEL it issues __NR_stat, otherwise it issues __NR_stat64 and convert to non-LFS stat struct handling possible overflows on st_ino, st_size, or st_blocks. Also the non-LFS mips is an outlier and it has its own implementation since _STAT_VER_LINUX requires a different conversion function (it uses the kernel_stat as the syscall argument since its exported ABI is different than the kernel one for both non-LFS and LFS implementation). The generic LFS implementation handles multiple cases: 1. XSTAT_IS_XSTAT64 being 1: 1.1. Old 64-bit kABI (ia64, powerpc64*, s390x, x86_64): it issues __NR_stat for _STAT_VER_KERNEL or _STAT_VER_LINUX. 1.2. Old 64-bit kABI with defines __NR_stat64 instead of __NR_stat (sparc64): it issues __NR_stat for _STAT_VER_KERNEL or __NR_stat64 and convert to struct stat64. 1.3. New kABIs which uses generic 64-bit Linux ABI (aarch64 and riscv64): it issues __NR_newfstatat and only for _STAT_VER_KERNEL. 1.4. New 32-bit kABIs with only 64-bit time_t support (arc and riscv32): it issues __NR_statx and covert to struct stat64. 2. Old ABIs with XSTAT_IS_XSTAT64 being 0: 2.1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and nios2): it issues __NR_fstatat64 for _STAT_VER_KERNEL. 2.2. Old kABIs with old non-LFS support (arm, i386, hppa, m68k, microblaze, s390, sh, mips32, powerpc32, and sparc32): it issues __NR_stat64. Also, two special cases requires specific LFS implementations: 1. alpha: it requires to handle _STAT_VER_KERNEL64 to call __NR_stat64 or use the kernel_stat with __NR_stat otherwise. 2. mips64: as for non-LFS implementation its ABIs differ from glibc exported one, which requires an specific conversion function to handle the kernel_stat. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Define STAT64_IS_KERNEL_STAT64Adhemerval Zanella2020-09-1113-0/+23
| | | | | | | | | | | It indicates that the glibc export stat64 is similar in size and layout of the kernel stat64 used on the syscall. It is not currently used on stat implementation, but the idea is to indicate whether to use the kernel_stat to issue on the syscall on the *stat*64 variant (more specifically on mips which its exported ABI does not match the kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Always define STAT_IS_KERNEL_STATAdhemerval Zanella2020-09-1114-7/+15
| | | | | | | | It allows to check for its value instead of its existence. Checked with a build for all affected ABIS. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Update powerpc libm-test-ulpsMatheus Castanho2020-09-101-3/+3
| | | | | | | | | | | | | Before this patch, the following tests were failing: ppc and ppc64: FAIL: math/test-ldouble-j0 ppc64le: FAIL: math/test-float128-j0 FAIL: math/test-float64x-j0 FAIL: math/test-ibm128-j0 FAIL: math/test-ldouble-j0
* nptl: futex: Provide correct indentation for part of ↵Lukasz Majewski2020-09-091-3/+3
| | | | | | | __futex_abstimed_wait_cancelable64 By mistake the if for calling __futex_abstimed_wait_cancellable32 was misaligned with the rest of the function body.
* C11 threads: Fix inaccuracies in testsuiteCorinna Vinschen2020-09-073-3/+3
| | | | | | | | | | | | | | | | - tst-mtx-recursive.c: mtx_init fails to use mtx_plain. Per C11 specs, using mtx_recursive alone is not supported. This isn't catched because mtx_plain is defined as 0. - tst-thrd-sleep.c: thrd_sleep returns 0 on success, a negative value on failure. Testing against thrd_success is incorrect. - tst-tss-basic.c: tss_set is incorrectly checkd for a non-0 value. The test should test aginst C11 threads error codes. This isn't catched because thrd_success is defined as 0. Note that all three tests fail on FreeBSD, which defines all mutex type values, as well as all C11 threads error codes with non-0 values.
* x86: Set CPU usable feature bits conservatively [BZ #26552]H.J. Lu2020-09-031-96/+47
| | | | | | Set CPU usable feature bits only for CPU features which are usable in user space and whose usability can be detected from user space, excluding features like FSGSBASE whose enable bit can only be checked in the kernel.
* Update i686 ulps.Patsy Griffin2020-09-021-3/+3
| | | | | | | | | | | | | Without this ULP patch these 3 tests fail on i686: FAIL: math/test-float128-j0 FAIL: math/test-float64x-j0 FAIL: math/test-ldouble-j0 CPU info: Vendor ID: GenuineIntel CPU family: 6 Model: 85 Model name: Intel Xeon Processor (Cascadelake)
* Use LFS readdir in generic POSIX getcwd [BZ# 22899]Adhemerval Zanella2020-09-022-4/+9
| | | | Checked on x86_64-linux-gnu and i686-linux-gnu.
* linux: Remove __ASSUME_ATFCTSAdhemerval Zanella2020-09-021-4/+0
| | | | | | The __have_atfcts is not used anywhere. Checked on x86_64-linux-gnu.
* Sync getcwd with gnulibAdhemerval Zanella2020-09-022-421/+376
| | | | | | | | | | This is the first of a series of patches to sync with Gnulib commit 615b43e1f9. This patch adopts most of the changes of Gnulib, except it retains GETCWD_RETURN_TYPE and does not always use a 64-bit internal API. These remaining discrepancies will be addressed in later patches in this series. Checked on x86_64-linux-gnu and i686-linux-gnu.
* x86-64: Fix FMA4 detection in ifunc [BZ #26534]Ondřej Hošek2020-09-021-1/+1
| | | | | | A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the FMA4 code path to be taken on systems that support FMA, even if they do not support FMA4. Fix this to detect FMA4.
* y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit timeLukasz Majewski2020-09-023-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pthread_cond_clockwait and pthread_cond_timedwait have been converted to support 64 bit time. This change introduces new futex_abstimed_wait_cancelable64 function in ./sysdeps/nptl/futex-helpers.c, which uses futex_time64 where possible and tries to replace low-level preprocessor macros from lowlevellock-futex.h The pthread_cond_{clock|timed}wait only accepts absolute time. Moreover, there is no need to check for NULL passed as *abstime pointer as __pthread_cond_wait_common() always passes non-NULL struct __timespec64 pointer to futex_abstimed_wait_cancellable64(). For systems with __TIMESIZE != 64 && __WORDSIZE == 32: - Conversions between 64 bit time to 32 bit are necessary - Redirection to __pthread_cond_{clock|timed}wait64 will provide support for 64 bit time The futex_abstimed_wait_cancelable64 function has been put into a separate file on the purpose - to avoid issues apparent on the m68k architecture related to small number of available registers (there is not enough registers to put all necessary arguments in them if the above function would be added to futex-internal.h with __always_inline attribute). In fact - new function - namely __futex_abstimed_wait_cancellable32 is used to reduce number of needed registers (as some in-register values are stored on the stack when function call is made). Build tests: ./src/scripts/build-many-glibcs.py glibcs Run-time tests: - Run specific tests on ARM/x86 32bit systems (qemu): https://github.com/lmajewski/meta-y2038 and run tests: https://github.com/lmajewski/y2038-tests/commits/master Above tests were performed with Y2038 redirection applied as well as without to test the proper usage of both __pthread_cond_{clock|timed}wait64 and __pthread_cond_{clock|timed}wait. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x32: Add <fixup-asm-unistd.h> and regenerate arch-syscall.hH.J. Lu2020-08-312-0/+22
| | | | | | | | | | | | | | | | X32 uses the same 64-bit syscall interface for set_thread_area. But __NR_set_thread_area is missing from <asm/unistd_x32.h>. A kernel patch was submitted: From 7b05d5b43ae2545e0d4a3edb24205d18bc883626 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.tools@gmail.com> Date: Sat, 15 Aug 2020 10:34:00 -0700 Subject: [PATCH] x86-64: Enable x32 set_thread_area X32 uses the common 64-bit syscall interface for set_thread_area. Add <fixup-asm-unistd.h> to provide __NR_set_thread_area. Co-authored-by: Florian Weimer <fweimer@redhat.com>
* AArch64: Improve backwards memmove performanceWilco Dijkstra2020-08-281-3/+4
| | | | | | | | On some microarchitectures performance of the backwards memmove improves if the stores use STR with decreasing addresses. So change the memmove loop in memcpy_advsimd.S to use 2x STR rather than STP. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* RISC-V: Build infrastructure for 32-bit portZong Li2020-08-279-10/+69
| | | | | | | | This patch lays out the top-level organisation of the RISC-V 32-bit port. It provides all the Implies files as well as various other fragments of the build infrastructure. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add rv32 path to RTLDLIST in lddZong Li2020-08-271-1/+1
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* riscv32: Specify the arch_minimum_kernel as 5.4Alistair Francis2020-08-272-0/+8
| | | | | | | | | | Specify the minimum kernel version for RISC-V 32-bit as the 5.4 kernel. We require this commit: "waitid: Add support for waiting for the current process group" for the kernel as it adds support for the P_PGID id for the waitid syscall. Without this patch we can't replace the wait4 syscall on 64-bit time_t only systems. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Fix llrint and llround missing exceptions on RV32Zong Li2020-08-271-0/+38
| | | | | | | | | Conversions from a float to a long long on 32-bit RISC-V (RV32) may not raise the correct exceptions on overflow, it also may raise spurious "inexact" exceptions on non overflow cases. This patch fixes the problem, similarly to the fix for MIPS, ARM and S390. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add the RV32 libm-test-ulpsAlistair Francis2020-08-272-0/+1406
| | | | | | | | | Add a libm-test-ulps for RV32, this is the same as the RV64 one. This dosn't match what is generated by running `make regen-ulps` on RV32 QEMU, but the current in tree RV64 doesn't match that either. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add 32-bit ABI listsAlistair Francis2020-08-2713-0/+3336
| | | | | | Use the update-abi Make target to generate the abilist for RV32. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add hard float support for 32-bit CPUsZong Li2020-08-274-0/+124
| | | | | | | This patch adds support for hardware floating-point support for the RV32IF and RV32IFD platforms. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Support the 32-bit ABI implementationAlistair Francis2020-08-277-22/+146
| | | | | | | This patch adds the ABI implementation for 32-bit RISC-V. It contains the Linux-specific and RISC-V architecture code. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add arch-syscall.h for RV32Alistair Francis2020-08-271-0/+284
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add path of library directories for the 32-bitAlistair Francis2020-08-271-16/+38
| | | | | | | | | | | | | | | | | With RV32 support the list of possible RISC-V system directories increases to: - /lib64/lp64d - /lib64/lp64 - /lib32/ilp32d - /lib32/ilp32 - /lib (only ld.so) This patch changes the add_system_dir () macro to support the new ilp32d and ilp32 directories for RV32. While refactoring this code let's split out the confusing if statements into a loop to make it easier to understand and extend. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Support dynamic loader for the 32-bitZong Li2020-08-271-1/+1
| | | | | | Add the LD_SO_ABI definition for RISC-V 32-bit. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add support for 32-bit vDSO callsAlistair Francis2020-08-271-6/+17
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Use 64-bit-time syscall numbers with the 32-bit portAlistair Francis2020-08-271-0/+23
| | | | | | | | | | | | | | | | | | | sysdep.h redefines only the syscall where the generic implementation still does not have actual 64-bit time_t support: /* Workarounds for generic code needing to handle 64-bit time_t. */ /* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ #define __NR_clock_getres __NR_clock_getres_time64 /* Fix sysdeps/nptl/lowlevellock-futex.h. */ #define __NR_futex __NR_futex_time64 [...] This patch also adds a comment that it is a workaround to handle 64-bit time_t and on each #define comment for which implementation it intends to. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Cleanup some of the sysdep.h codeAlistair Francis2020-08-271-13/+4
| | | | | | | | Remove a duplicate inclusion of <sysdeps/unix/sysdep.h> which is already pulled via <sysdeps/unix/sysv/linux/generic/sysdep.h>, and the inclusion of <errno.h> whose definition of `__set_errno' is not needed here. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Use 64-bit time_t and off_t for RV32 and RV64Alistair Francis2020-08-274-0/+162
| | | | | | | | | | | | | | | | | | | | | | Using the original glibc headers under bits/ let's make small modifications to use 64-bit time_t and off_t for both RV32 and RV64. For the typesizes.h, here are justifications for the changes from the generic version (based on Arnd's very helpful feedback): - All the !__USE_FILE_OFFSET64 types (__off_t, __ino_t, __rlim_t, ...) are changed to match the 64-bit replacements. - __time_t is defined to 64 bit, but no __time64_t is added. This makes sense as we don't have the time64 support for other 32-bit architectures yet, and it will be easy to change when that happens. - __suseconds_t is 64-bit. This matches what we use the kernel ABI for the few drivers that are relying on 'struct timeval' input arguments in ioctl, as well as the adjtimex system call. It means that timeval has to be defined without the padding, unlike timespec, which needs padding. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* hurd: define BSD 4.3 ioctls only under __USE_MISCSamuel Thibault2020-08-271-0/+2
|
* linux: Simplify utimensatAdhemerval Zanella2020-08-241-13/+10
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_utimensat or __NR_utimensat_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify timerfd_settimeAdhemerval Zanella2020-08-241-14/+9
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_timer_settime or __NR_time_settime_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify timer_gettimeAdhemerval Zanella2020-08-241-12/+8
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_timer_gettime or __NR_time_gettime_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify sched_rr_get_intervalAdhemerval Zanella2020-08-241-12/+8
| | | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_sched_rr_get_interval or __NR_sched_rr_get_interval_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify ppollAdhemerval Zanella2020-08-241-11/+10
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_ppoll or __NR_ppoll_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify mq_timedsendAdhemerval Zanella2020-08-241-7/+7
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_mq_timedsend or __NR_mq_timedsend_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify mq_timedreceiveAdhemerval Zanella2020-08-241-9/+9
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_mq_timedreceive or __NR_mq_timedreceive_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify clock_settimeAdhemerval Zanella2020-08-241-9/+9
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_clock_settime or __NR_clock_settime_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify clock_nanosleepAdhemerval Zanella2020-08-241-22/+11
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_clock_nanosleep or __NR_clock_nanosleep_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* linux: Simplify clock_gettimeAdhemerval Zanella2020-08-241-25/+17
| | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_clock_gettime or __NR_clock_gettime_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. It also uses the time64-support functions to simplify it further. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel).
* linux: Simplify clock_adjtimeAdhemerval Zanella2020-08-241-13/+10
| | | | | | | | | | | | With arch-syscall.h it can now assumes the existance of either __NR_clock_adjtime or __NR_clock_adjtime_time64. The 32-bit time_t support is now only build for !__ASSUME_TIME64_SYSCALLS. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>