| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Use the update-abi Make target to generate the abilist for RV32.
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
|
|
|
|
|
|
|
| |
This patch adds support for hardware floating-point support for the
RV32IF and RV32IFD platforms.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pthread_clockjoin_np and pthread_timedjoin_np have been converted to
support 64 bit time.
This change introduces new futex_timed_wait_cancel64 function in
./sysdeps/nptl/futex-internal.h, which uses futex_time64 where possible
and tries to replace low-level preprocessor macros from
lowlevellock-futex.h
The pthread_{timed|clock}join_np only accept absolute time. Moreover,
there is no need to check for NULL passed as *abstime pointer as
clockwait_tid() always passes struct __timespec64.
For systems with __TIMESIZE != 64 && __WORDSIZE == 32:
- Conversions between 64 bit time to 32 bit are necessary
- Redirection to __pthread_{clock|timed}join_np64 will provide support
for 64 bit time
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_{timed|clock}join_np64 and
__pthread_{timed|clock}join_np.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
|
|
|
|
| |
For new j0 test.
|
|
|
|
|
|
| |
Updates needed after new j0 test:
commit 9bfc225078219521439ec8b0f665915e769d40c2
math: Regenerate auto-libm-test-out-j0
|
|
|
|
| |
From new j0 test.
|
|
|
|
|
|
|
| |
This provides correct AT_EACCESS handling and also takes
Linux security modules into account.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
| |
Checked on x86_64-linux-gnu and i686-linux-gnu.
|
|
|
|
|
|
|
|
| |
Linux 5.8 has one new syscall, faccessat2. Update syscall-names.list
and regenerate the arch-syscall.h headers with build-many-glibcs.py
update-syscalls.
Tested with build-many-glibcs.py.
|
|
|
|
|
|
|
| |
* nptl/{tst-cancel4-common.c, tst-cancel4-common.h, tst-cancel4.c,
tst-cancel5.c, tst-cancelx4.c, tst-cancelx5.c}: Move to sysdeps/pthread/
* nptl/Makefile: Move corresponding rules to...
* sysdeps/pthread/Makefile: ... here.
|
|
|
|
| |
* sysdeps/mach/hurd/sched_gets.c (__sched_getscheduler): Add hidden def.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Making the brk start exactly at the end of the main application binary was
requiring to get it through the _end symbol, which does not work any more
with recent toolchains, and actually produces in libc.so a confusing
external _end symbol that produces odd results, see
https://sourceware.org/bugzilla/show_bug.cgi?id=23499
Trying to do so is quite outdated anyway with the tendency for address
randomization.
Using _end was also allowing to include the main binary data within
the RLIMIT_DATA, but this also seems outdated with dynamic library
loading, and nowadays' memory consumption via malloc and mmap rather than
statically-allocated data.
This adds a BRK_START macro in <vm_param.h> that just tells where we
want to start the brk, and thus removes the _end symbol.
* sysdeps/mach/hurd/i386/vm_param.h: New file.
* sysdeps/mach/hurd/brk.c: Use BRK_START as brk start instead of _end.
Also ignore __data_start.
* hurd/Versions: Remove _end symbol.
* sysdeps/mach/hurd/i386/libc.abilist: Remove _end symbol.
|
|
|
|
|
| |
* sysdeps/mach/hurd/sched_gets.c: New file.
* sysdeps/mach/hurd/sched_sets.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Intel64 and IA-32 Architectures Software Developer’s Manual has changed
the following CPU feature names:
1. The CPU feature of Enhanced Intel SpeedStep Technology is renamed
from EST to EIST.
2. The CPU feature which supports Platform Quality of Service Monitoring
(PQM) capability is changed to Intel Resource Director Technology
(Intel RDT) Monitoring capability, i.e. PQM is renamed to RDT_M.
3. The CPU feature which supports Platform Quality of Service
Enforcement (PQE) capability is changed to Intel Resource Director
Technology (Intel RDT) Allocation capability, i.e. PQE is renamed to
RDT_A.
|
| |
|
|
|
|
|
|
|
| |
Produced with HiFive Unleashed hardware using Linux 5.8-rc5 exactly and
GCC 10.0.1 20200426.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__GLRO loaded the word after the requested variable on big-endian
PowerPC, where LOWORD is 4. This can cause the memset implement
go wrong because the masking with the cache line size produces
wrong results, particularly if the loaded value happens to be 1.
The __GLRO macro is not used in any place where loading the lower
32-bit word of a 64-bit value is desired, so the +4 offset is always
wrong.
Fixes commit 18363b4f010da9ba459b13310b113ac0647c2fcc
("powerpc: Move cache line size to rtld_global_ro") and bug 26332.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Make glibc MTE-safe on systems where MTE is available. This allows
using heap tagging with an LD_PRELOADed malloc implementation that
enables MTE. We don't document this as guaranteed contract yet, so
glibc may not be MTE safe when HWCAP2_MTE is set (older glibcs
certainly aren't). This is mainly for testing and debugging.
The HWCAP flag is not exposed in public headers until Linux adds it
to its uapi. The HWCAP value reservation will be in Linux 5.9.
|
|
|
|
|
|
| |
x86_64 Intel(R) Core(TM) i5-8265U
gcc (Gentoo 10.1.0-r2 p3) 10.1.0
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use PROT_READ and PROT_WRITE according to the load segment p_flags
when adding PROT_BTI.
This is before processing relocations which may drop PROT_BTI in
case of textrels. Executable stacks are not protected via PROT_BTI
either. PROT_BTI is hardening in case memory corruption happened,
it's value is reduced if there is writable and executable memory
available so missing it on such memory is fine, but we should
respect the p_flags and should not drop PROT_WRITE.
|