| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The syscall __NR_clock_getres_time64 (for 32-bit) or __NR_clock_getres
(for 64-bit) is used as default. The 32-bit fallback is used iff
__ASSUME_TIME64_SYSCALLS is not defined, which assumes the kernel ABI
provides either __NR_rt_sigtimedwait (32-bit time_t).
Since the symbol does not use any type which might be affected by the
time_t, there is no need to add a 64-bit variant.
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>
|
|
|
|
|
|
|
|
|
|
|
| |
The syscall __NR_sigtimedwait_time64 (for 32-bit) or __NR_sigtimedwait
(for 64-bit) is used as default. The 32-bit fallback is used iff
__ASSUME_TIME64_SYSCALLS is not defined, which assumes the kernel ABI
provides either __NR_rt_sigtimedwait (32-bit time_t).
Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The syscall __NR_pselect6_time64 (32-bit) or __NR_pselect6 (64-bit)
is used as default. For architectures with __ASSUME_TIME64_SYSCALLS
the 32-bit fallback uses __NR_select/__NR__newselect or __NR_pselect6
(it should cover the microblaze case where older kernels do not
provide __NR_pselect6).
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>
|
|
|
|
|
|
|
| |
The __NR_ipc syscall does not support 64-bit time operations. It
fixes 7c437d3778.
Checked on i686-linux-gnu on a Linux 5.4.
|
|
|
|
|
|
|
| |
This patch adds the ABI-related bits to reflect the new mallinfo2
function, and adds a test case to verify basic functionality.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to commit a26e2e9feab87d4f745c31411458b048742ac733
"Allow memset local PLT reference for powerpc soft-float.".
GCC 10.1 results in the localplt test failing for RISC-V.
From the original commit for power-pc:
Since memset is documented as a function GCC may always implicitly
generate calls to, it seems reasonable to allow that local PLT
reference (just like those for libgcc functions that GCC implicitly
generates calls to and that are also exported from libc.so), which
this patch does.
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit a92f4e6299fe0e3cb6f77e79de00817aece501ce
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Jul 6 13:27:12 2020 -0300
linux: Add time64 pselect support
changed pselect.c to
r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds,
timeout,
((__syscall_ulong_t[]){ (uintptr_t) sigmask,
__NSIG_BYTES }));
which doesn't work with x32's ARGIFY and data passed to syscall isn't
initialized with sigmask and __NSIG_BYTES. Change to
__syscall_ulong_t data[2] =
{
(uintptr_t) sigmask, __NSIG_BYTES
};
r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds,
timeout, data);
fixes [BZ #26606].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Install <sys/platform/x86.h> so that programmers can do
#if __has_include(<sys/platform/x86.h>)
#include <sys/platform/x86.h>
#endif
...
if (CPU_FEATURE_USABLE (SSE2))
...
if (CPU_FEATURE_USABLE (AVX2))
...
<sys/platform/x86.h> exports only:
enum
{
COMMON_CPUID_INDEX_1 = 0,
COMMON_CPUID_INDEX_7,
COMMON_CPUID_INDEX_80000001,
COMMON_CPUID_INDEX_D_ECX_1,
COMMON_CPUID_INDEX_80000007,
COMMON_CPUID_INDEX_80000008,
COMMON_CPUID_INDEX_7_ECX_1,
/* Keep the following line at the end. */
COMMON_CPUID_INDEX_MAX
};
struct cpuid_features
{
struct cpuid_registers cpuid;
struct cpuid_registers usable;
};
struct cpu_features
{
struct cpu_features_basic basic;
struct cpuid_features features[COMMON_CPUID_INDEX_MAX];
};
/* Get a pointer to the CPU features structure. */
extern const struct cpu_features *__x86_get_cpu_features
(unsigned int max) __attribute__ ((const));
Since all feature checks are done through macros, programs compiled with
a newer <sys/platform/x86.h> are compatible with the older glibc binaries
as long as the layout of struct cpu_features is identical. The features
array can be expanded with backward binary compatibility for both .o and
.so files. When COMMON_CPUID_INDEX_MAX is increased to support new
processor features, __x86_get_cpu_features in the older glibc binaries
returns NULL and HAS_CPU_FEATURE/CPU_FEATURE_USABLE return false on the
new processor feature. No new symbol version is neeeded.
Both CPU_FEATURE_USABLE and HAS_CPU_FEATURE are provided. HAS_CPU_FEATURE
can be used to identify processor features.
Note: Although GCC has __builtin_cpu_supports, it only supports a subset
of <sys/platform/x86.h> and it is equivalent to CPU_FEATURE_USABLE. It
doesn't support HAS_CPU_FEATURE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The syscall __NR_pselect6_time64 (32-bit) or __NR_pselect6 (64-bit)
is used as default. For architectures with __ASSUME_TIME64_SYSCALLS
the 32-bit fallback uses __NR_pselec6.
To accomodate microblaze missing pselect6 support on kernel older
than 3.15 the fallback is moved to its own function to the microblaze
specific implementation can override 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Either the __NR_semtimedop_time64 (for 32-bit) or the __NR_semtimedop
(for 64-bit) syscall is used as default. The 32-bit fallback is used
iff __ASSUME_TIME64_SYSCALLS is not defined, which assumes the kernel
ABI provides either __NR_ipc or __NR_semtimeop (for 32-bit time_t).
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Checked on x86_64-linux-gnu and i686-linux-gnu.
|
|
|
|
|
|
| |
The __have_atfcts is not used anywhere.
Checked on x86_64-linux-gnu.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Use the update-abi Make target to generate the abilist for RV32.
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Add the LD_SO_ABI definition for RISC-V 32-bit.
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
| |
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These helper functions are used to optimize the 64-bit time_t support on
configurations that requires support for 32-bit time_t fallback
(!__ASSUME_TIME64_SYSCALLS). The idea is once the kernel advertises that
it does not have 64-bit time_t support, glibc will stop to try issue the
64-bit time_t syscall altogether.
For instance:
#ifndef __NR_symbol_time64
# define __NR_symbol_time64 __NR_symbol
#endif
int r;
if (supports_time64 ())
{
r = INLINE_SYSCALL_CALL (symbol, ...);
if (r == 0 || errno != ENOSYS)
return r;
mark_time64_unsupported ();
}
#ifndef __ASSUME_TIME64_SYSCALLS
<32-bit fallback syscall>
#endif
return r;
On configuration with default 64-bit time_t this optimization should be
optimized away by the compiler resulting in no overhead.
|
|
|
|
|
|
|
| |
Unfortunately some HWCAP names like HWCAP_S390_VX differs between
kernel (see <kernel>/arch/s390/include/asm/elf.h) and glibc.
Therefore, those HWCAP names from kernel are now introduced as alias
|
|
|
|
|
|
|
|
| |
This patch updates the kernel version in the test tst-mman-consts.py
to 5.8. (There are no new MAP_* constants covered by this test in 5.8
that need any other header changes.)
Tested with build-many-glibcs.py.
|