arm: Re-enable PI futex support for ARM kernels >= 3.14.3

Message ID 1414437473-30931-1-git-send-email-gratian.crisan@ni.com
State Committed
Headers

Commit Message

Gratian Crisan Oct. 27, 2014, 7:17 p.m. UTC
  From: Gratian Crisan <gratian.crisan@ni.com>

ARM linux kernels before 3.14.3 may or may not support
futex_atomic_cmpxchg_inatomic depending on the kernel configuration (e.g.
CONFIG_CPU_USE_DOMAINS && CONFIG_SMP configuration was not supported)

Starting with 3.14.3 the linux kernel unconditionally enables support for
ARM, and this re-enables the relevant __ASSUME_* macros.

Tested on ARM both with kernels >= 3.14.3 and older kernels.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
---
ChangeLog:

2014-10-27  Gratian Crisan  <gratian.crisan@ni.com>

	* sysdeps/unix/sysv/linux/arm/kernel-features.h
	[__LINUX_KERNEL_VERSION < 0x030E03] (__ASSUME_FUTEX_LOCK_PI): Undefine.
	[__LINUX_KERNEL_VERSION < 0x030E03] (__ASSUME_REQUEUE_PI): Likewise.
	[__LINUX_KERNEL_VERSION < 0x030E03] (__ASSUME_SET_ROBUST_LIST):
	Likewise.
---
 sysdeps/unix/sysv/linux/arm/kernel-features.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
  

Comments

Joseph Myers Oct. 27, 2014, 10:47 p.m. UTC | #1
Thanks, committed (with the ChangeLog entry adjusted to say what had 
actually changed - that is, that the macros were no longer undefined with 
__LINUX_KERNEL_VERSION >= 0x030E03).
  

Patch

diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index e755741..84d9e9d 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -34,9 +34,11 @@ 
 
 #include_next <kernel-features.h>
 
-/* The ARM kernel may or may not support
+/* The ARM kernel before 3.14.3 may or may not support
    futex_atomic_cmpxchg_inatomic, depending on kernel
    configuration.  */
-#undef __ASSUME_FUTEX_LOCK_PI
-#undef __ASSUME_REQUEUE_PI
-#undef __ASSUME_SET_ROBUST_LIST
+#if __LINUX_KERNEL_VERSION < 0x030E03
+# undef __ASSUME_FUTEX_LOCK_PI
+# undef __ASSUME_REQUEUE_PI
+# undef __ASSUME_SET_ROBUST_LIST
+#endif