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: 403844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4095A14003E for ; Tue, 28 Oct 2014 06:18:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=EU1u315SNG5xx7zFeFfWN+8dAMHChXDq6IBD7vr/4zFKiBLPZ4MfI M9kBYCWg8BWHcIrm/9eT4JPH5BVcglmuXmXxddsptq4buTwfgvUyUosNUPRT0CIC 6xZ/Z8evsTZ5BSOw66Z5DcuLYBATtDxr6V6RAX3iAY3Eq07/XSes+8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=MsH3mFJZUYrQGGaPpDoWyd7GZOI=; b=rI0CVSYEEnSYEtZxUxt7InIbdZ9i C3CHkl4t4lBYxSnCvKV1rd5h4xMeOUuMu3G68K5U+/DpJywaSxL5uEKaCQBKIHlb tI1Dc9cfl+/+bjbTPdBEJj7sij3WgrhgHd1EE8yov5qdAS21CfUyGTc4gIl8WzSA 2b7ztArPpvwE9iU= 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