glibc/sysdeps/unix/sysv/linux/mips
Adhemerval Zanella f5c77f78ec Remove __ASSUME_FUTEX_LOCK_PI
This patch removes __ASSUME_FUTEX_LOCK_PI usage and assumes that
kernel will correctly return if it supports or not
futex_atomic_cmpxchg_inatomic.

Current PI mutex code already has runtime support by calling
prio_inherit_missing and returns ENOTSUP if the futex operation fails
at initialization (it issues a FUTEX_UNLOCK_PI futex operation).

Also, current minimum supported kernel (v3.2) will return ENOSYS if
futex_atomic_cmpxchg_inatomic is not supported in the system:

kernel/futex.c:

2628 long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
2629                 u32 __user *uaddr2, u32 val2, u32 val3)
2630 {
2631         int ret = -ENOSYS, cmd = op & FUTEX_CMD_MASK;
[...]
2667         case FUTEX_UNLOCK_PI:
2668                 if (futex_cmpxchg_enabled)
2669                         ret = futex_unlock_pi(uaddr, flags);
[...]
2686         return ret;
2687 }

The futex_cmpxchg_enabled is initialized by calling cmpxchg_futex_value_locked,
which calls futex_atomic_cmpxchg_inatomic.

For ARM futex_atomic_cmpxchg_inatomic will be either defined (if both
CONFIG_CPU_USE_DOMAINS and CONFIG_SMP are not defined) or use the
default generic implementation that returns ENOSYS.

For m68k is uses the default generic implementation.

For mips futex_atomic_cmpxchg_inatomic will return ENOSYS if cpu has no
'cpu_has_llsc' support (defined by each chip supporte inside kernel).

For sparc, 32-bit kernel will just use default generic implementation,
while 64-bit kernel has support.

Tested on ARM (v3.8 kernel) and x86_64.

	* nptl/pthread_mutex_init.c [__ASSUME_FUTEX_LOCK_PI]
	(prio_inherit_missing): Remove define.
	* sysdeps/unix/sysv/linux/arm/kernel-features.h
	(__ASSUME_FUTEX_LOCK_PI): Likewise.
	* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FUTEX_LOCK_PI):
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
	(__ASSUME_FUTEX_LOCK_PI): Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel-features.h
	(__ASSUME_FUTEX_LOCK_PI): Likewise.
	* sysdeps/unix/sysv/linux/sparc/kernel-features.h
	(__ASSUME_FUTEX_LOCK_PI): Likewise.
2016-06-13 08:36:34 -03:00
..
bits Fix termios.h XCASE namespace (bug 19925). 2016-04-08 18:16:09 +00:00
mips32 Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
mips64 Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
sys Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
____longjmp_chk.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
_test_and_set.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
arch-fork.h Split arch-fork.h from fork.h 2014-05-16 11:17:41 -07:00
brk.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
clone.S Fix clone (CLONE_VM) pid/tid reset (BZ#19957) 2016-04-29 18:19:30 -03:00
configure MIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaN 2016-01-25 00:19:27 +00:00
configure.ac MIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaN 2016-01-25 00:19:27 +00:00
dl-cache.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-static.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getmsg.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
getrlimit64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getsysstats.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
init-first.c VDSO support for MIPS 2016-04-12 11:05:13 +01:00
ipc_priv.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
kernel_rt_sigframe.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
kernel_sigaction.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
kernel_stat.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
kernel_termios.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
kernel-features.h Remove __ASSUME_FUTEX_LOCK_PI 2016-06-13 08:36:34 -03:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-abis Add support for MIPS O32 FPXX and .MIPS.abiflags 2014-12-31 21:09:21 +00:00
libc-vdso.h VDSO support for MIPS 2016-04-12 11:05:13 +01:00
makecontext.S mips: terminate the FDE before the return trampoline in makecontext 2016-03-09 18:48:18 +01:00
Makefile VDSO support for MIPS 2016-04-12 11:05:13 +01:00
pipe.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
profil-counter.h Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
pt-vfork.S MIPS: Consolidate NPTL/non versions of vfork 2014-06-27 11:18:10 -07:00
putmsg.c Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
readelflib.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setrlimit64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sigaction.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
swapcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
syscalls.list Adjust kernel-features.h defaults for recvmsg and sendmsg 2016-05-25 17:27:57 -03:00
sysdep-cancel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ucontext_i.sym Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
ustat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Versions VDSO support for MIPS 2016-04-12 11:05:13 +01:00
vfork.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
xstatconv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00