summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/posix_fadvise.c
AgeCommit message (Collapse)Author
2018-04-27Remove tilegx port.Joseph Myers
Since tile support has been removed from the Linux kernel for 4.17, this patch removes the (unmaintained) port to tilegx from glibc (the tilepro support having been previously removed). This reflects the general principle that a glibc port needs upstream support for the architecture in all the components it build-depends on (so binutils, GCC and the Linux kernel, for the normal case of a port supporting the Linux kernel but no other OS), in order to be maintainable. Apart from removal of sysdeps/tile and sysdeps/unix/sysv/linux/tile, there are updates to various comments referencing tile for which removal of those references seemed appropriate. The configuration is removed from README and from build-many-glibcs.py. contrib.texi keeps mention of removed contributions, but I updated Chris Metcalf's entry to reflect that he also contributed the non-removed support for the generic Linux kernel syscall interface. __ASSUME_FADVISE64_64_NO_ALIGN support is removed, as it was only used by tile. * sysdeps/tile: Remove. * sysdeps/unix/sysv/linux/tile: Likewise. * README (tilegx-*-linux-gnu): Remove from list of supported configurations. * manual/contrib.texi (Contributors): Mention Chris Metcalf's contribution of support for generic Linux kernel syscall interface. * scripts/build-many-glibcs.py (Context.add_all_configs): Remove tilegx configurations. (Config.install_linux_headers): Do not handle tile. * sysdeps/unix/sysv/linux/aarch64/ldsodefs.h: Do not mention Tile in comment. * sysdeps/unix/sysv/linux/nios2/Makefile: Likewise. * sysdeps/unix/sysv/linux/posix_fadvise.c: Likewise. [__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove conditional undefine and redefine. * sysdeps/unix/sysv/linux/posix_fadvise64.c: Do not mention Tile in comment. [__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove conditional undefine and redefine.
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-02-06Consolidate arm and mips posix_fadvise implementationsAdhemerval Zanella
As noted by c1f0601389db64d9, previous posix_fadvise consolidation broke on mips o32. As stated in commit message, MIPS o32 only defines __NR_fadvise64 and it is behaves like __NR_fadvise64_64. This patches consolidates both ARM and mips o32 version by fixing the ARM used option (__NR_fadvise64_64 withouth the alignment required by abi) and added another option, __ASSUME_FADVISE64_AS_64_64, which is used on mips o32. When this option is used, posix_fadvise will use __NR_fadvise64_64 behavior (by defining or not __ASSUME_FADVISE64_64_6ARG). For mips, if __NR_fadvise64_64 is not defined, __NR_fadvise will be used. I also updated the posix_fadvise comments to explain better the different kernel abi used in the supported architectures. I checked with a mips o32 and verified that posix_fadvise.o is indeed using 7 argument syscall with the expected argument position. I also checked on i686-linux-gnu and arm-gnu-eabihf. * sysdeps/unix/sysv/linux/arm/posix_fadvise.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_FADVISE64_AS_64_64): Define. * sysdeps/unix/sysv/linux/posix_fadvise.c [__NR_fadvise64]: Add !defined __ASSUME_FADVISE64_AS_64_64 to use syscall issue. [!__NR_fadvise64 && __ASSUME_FADVISE64_64_6ARG]: Remove __ALIGNMENT_ARG usage. [!__NR_fadvise64 && !__ASSUME_FADVISE64_64_6ARG]: Define __NR_fadvise64_64 if it is not defined.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-10-07Consolidate posix_fadvise implementationsAdhemerval Zanella
This patch consolidates mostly of the Linux posix_fadvise{64} implementations on sysdeps/unix/sysv/linux/posix_fadvise{64}.c. It still keeps arch-specific files for: * S390-32: it uses a packed structure to pass all the arguments on syscall. It is the only supported port that implements __NR_fadvise64_64 in this way. * ARM: it does not implement __NR_fadvise64 (as other 32-bits ports), so posix_fadvise calls internal posix_fadvise64 symbol. * MIPS64 n64: it requires a different version number that other ports. The new macro SYSCALL_LL{64} is used to handle the offset argument and INTERNAL_SYSCALL_CALL to handle passing the correct number of expect arguments. The default Linux adds two new defines a port can use to control how __NR_fadvise64_64 passes the kernel arguments: * __ASSUME_FADVISE64_64_6ARG: the 'advise' argument is moved on second position. This is the case of powerpc32 and arm to avoid implement 7 argument syscall. * __ASSUME_FADVISE64_64_NO_ALIGN: for ABIs that defines __ASSUME_ALIGNED_REGISTER_PAIRS packs the offset without the leading '0'. This is the case of tile 32 bits. ARM also defines __NR_fadvise64_64 as __NR_arm_fadvise64_64 (which is also handled on arch kernel-feature.h). Tested on x86_64, x32, i686, armhf, and aarch64. * posix/Makefile (tests): Add tst-posix_fadvise and tst-posix_fadvise64. * posix/tst-posix_fadvise.c: New file. * posix/tst-posix_fadvise64.c: Likewise. * posix/tst-posix_fadvise-common.c: Likewise. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_FADVISE64_64_6ARG): Define. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h [!__powerpc64__] (__ASSUME_FADVISE64_64_6ARG): Add define. * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c: Remove file. * sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c (SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) [__posix_fadvise64_l64]: Alias to __posix_fadvise64_l32. (SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) [__posix_fadvise64_l32]: Add compat definition to posix_fadvise64. (SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) [__posix_fadvise64_l64]: Add versioned definition to posix_fadvise64. * sysdeps/unix/sysv/linux/posix_fadvise.c (posix_fadvise): Build iff __OFF_T_MATCHES_OFF64_T is defined, use INTERNAL_SYSCALL_CALL, add __ASSUME_FADVISE64_64_6ARG/__ASSUME_FADVISE64_64_NO_ALIGN support. * sysdeps/unix/sysv/linux/posix_fadvise64.c (posix_fadvise64): Add __ASSUME_FADVISE64_64_NO_ALIGN support and use INTERNAL_SYSCALL_CALL.
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-12-06linux: posix_fadvise: support __NR_fadvise64_64Mike Frysinger
Some arches do not have a __NR_fadvise64 but do have __NR_fadvise64_64. If the former is unavailable, fallback to the latter. Reviewed-by: Carlos O'Donell <carlos@systemhalted.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert
2003-08-17Update.Ulrich Drepper
2003-08-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/alpha/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/mips/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/sparc/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (PSEUDO_ERRVAL): Define. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysdep.h (PSEUDO_END_ERRVAL): Define. * sysdeps/unix/sysv/linux/syscalls.list (posix_fadvise64, posix_fadvise64_64): Remove. * sysdeps/unix/sysv/linux/alpha/syscalls.list (posix_fadvise64): Add V flag. * sysdeps/unix/sysv/linux/ia64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/i386/posix_fadvise64_64.S: Moved to... * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: ...here. (__posix_fadvise64_l64): Fix a typo in fadvise64 syscall invocation. (__posix_fadvise64_l32): New function. * sysdeps/unix/sysv/linux/i386/Makefile: Revert last change. * sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions (libc): Export posix_fadvise64@@GLIBC_2.3.3. * sysdeps/unix/sysv/linux/s390/s390-32/Versions (libc): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/Versions (libc): Likewise. * sysdeps/unix/sysv/linux/posix_fadvise.c (posix_fadvise): Return error value. * sysdeps/unix/sysv/linux/posix_fadvise64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (SYSCALL_ERROR_HANDLER): Use TLS errno/__libc_errno if USE___THREAD. 2003-08-15 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/dl-machine.h (WEAKADDR): Remove. (elf_machine_matches_host): Remove weak extern stuff. Use GL(dl_hwcap) unconditionally and GL(dl_hwcap_mask) if SHARED. (elf_machine_runtime_setup, sparc_fixup_plt): Remove weak extern stuff. Use GL(dl_hwcap) unconditionally.
2003-08-16Update.Ulrich Drepper
2003-08-15 Ulrich Drepper <drepper@redhat.com> * io/Versions [GLIBC_2.3.3]: Add posix_fadvise64. * io/fcntl.h (posix_fadvise64): Change type of third parameter to off_t. * sysdeps/unix/sysv/linux/posix_fadvise.c: Adjust definition. * sysdeps/unix/make-syscalls.sh: Recognize V prefix to the parameter description indicating the error value is returned, not -1. * sysdeps/unix/sysv/linux/Makefile [subdir=io] (subdir_routines): Add posix_fadvise64_64. * sysdeps/unix/sysv/linux/kernel-features.h: Add definition of __ASSUME_FADVISE64_64_SYSCALL. * sysdeps/unix/sysv/linux/syscalls.list: Don't define madvise and posix_madvise in one file. Have posix_madvise defined with error value returned. Define posix_fadvise64_64 entry. Add version info to posix_fadvise64 entry. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Define posix_fadvise64_64 entry. Add version info to posix_fadvise64 entry. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/posix_fadvise.S: New file. * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, and ret_ERRVAL. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * posix/Makefile (routines): Add posix_madvise. * sysdeps/generic/madvise.c: Don't define posix_madvise. * sysdeps/generic/posix_madvise.c: New file. * sysdeps/unix/sysv/aix/posix_madvise.c: New file.
2003-02-05Update.Ulrich Drepper
* sysdeps/unix/sysv/linux/posix_fadvise.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add posix_fadvise64 syscall. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.