From patchwork Mon Oct 27 19:17:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gratian Crisan X-Patchwork-Id: 3433 Received: (qmail 10111 invoked by alias); 27 Oct 2014 19:18:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 10080 invoked by uid 89); 27 Oct 2014 19:18:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: ni.com From: gratian.crisan@ni.com To: libc-alpha@sourceware.org Cc: Joseph Myers , gratian@gmail.com Subject: [PATCH] arm: Re-enable PI futex support for ARM kernels >= 3.14.3 Date: Mon, 27 Oct 2014 14:17:53 -0500 Message-Id: <1414437473-30931-1-git-send-email-gratian.crisan@ni.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-10-27_04:2014-10-27, 2014-10-27, 1970-01-01 signatures=0 From: Gratian Crisan 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 --- ChangeLog: 2014-10-27 Gratian Crisan * 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(-) 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 -/* 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