From patchwork Wed Sep 21 14:11:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 76690 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2072579qgf; Wed, 21 Sep 2016 07:11:39 -0700 (PDT) X-Received: by 10.98.99.67 with SMTP id x64mr65166453pfb.26.1474467099263; Wed, 21 Sep 2016 07:11:39 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id k87si15147098pfj.210.2016.09.21.07.11.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 07:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-73396-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-73396-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-73396-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=G/mwuTw5iMpp+w53AXCsuRbSsemxS4O 8Znp/Qnd4FY/zDZgG7r1FJ7XiidJvnxB1Tv/oOedtqJ8/WhtjpLpdTj+ZdkL3Iz9 Qr9PqGAdShsCSbI/rsx3a2J1D51osZR7asXcnjxC8gEFL8BBfatX/zaS/NXmLDyH ZOJCvcMiABpk= 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:subject:date:message-id:in-reply-to :references; s=default; bh=9z5SJIFvS8LAe61RUf3MtGf4OfA=; b=DZYif +b5gCj4hpkmqH+OZy8nD475dgcPp3O96FNWcBqlZAfEJUYbwep4S+hT4aSGm7L+0 0P6xCH1xy0puIjYWlYpRiQSj7/VOoMlTe/EqQLC47EBtSV0OgW7ao17njmLMJb6v 2hgUJYtPPvg8bH9EIxmyNcpPdv9rSnRfu0XqAY= Received: (qmail 78735 invoked by alias); 21 Sep 2016 14:11:25 -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 78716 invoked by uid 89); 21 Sep 2016 14:11:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:3333, 355 X-HELO: mail-yb0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=YqSCtYN0EkwJtf2k5uBgCir+ZYAv7WnIlLVLi/koB5M=; b=a7jixQinsfmOeeGq1UKuW6t7nnmqbQgdIYIXwijuUMetTmBK6UZbnzrXopgYf7AcyR Xg6yCyInp5+JCQDv7XBepgV78kUARz4oQJ1ywbInM3isojY4gMEUCagCM6jpGov92uBj k43E3D7b7/Qt1Zjvuxq04yT+HqQUlI3ymoYxpPAnELEXsT+3jlG0r1cuC0dFvStdKzrP PzTjSUGnW3Je246SGk1+alqaNUxblp8JTn56xX+5bnCEbQ2ogRMJdmUDhxR34oOqu7cc ESBzwgaO2hWtB7miubYEQFeWkvyLKFkYqCc/nzIIKaHcTdk7nCeMoScIsIhbsEE9tqlO +Csg== X-Gm-Message-State: AE9vXwN4dvnQu0KlP31pFpIeeayUJKjayQrpnL4i6N9aYoUr8pP2iSvw77RfdKlCr8DwkDPh X-Received: by 10.37.96.69 with SMTP id u66mr35449924ybb.7.1474467074219; Wed, 21 Sep 2016 07:11:14 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/2] linux: Remove __ASSUME_SET_ROBUST_LIST defines Date: Wed, 21 Sep 2016 11:11:06 -0300 Message-Id: <1474467066-26814-2-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1474467066-26814-1-git-send-email-adhemerval.zanella@linaro.org> References: <1474467066-26814-1-git-send-email-adhemerval.zanella@linaro.org> This patch removes __ASSUME_SET_ROBUST_LIST usage and assumes that kernel will correctly return if it supports or not futex_atomic_cmpxchg_inatomic. On minimum supported kernel (v3.2 and v2.6.32 for x86) kernel has: 2418 SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, 2419 size_t, len) 2420 { 2421 if (!futex_cmpxchg_enabled) 2422 return -ENOSYS; The patch also adds the __set_robust_list_avail runtime check for all architectures, since for some the syscall may still return ENOSYS if futex_atomic_cmpxchg_inatomic is not supported (for instance ARM). Tested on armhf (with 3.8 kernel) and x86_64. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/kernel-features.h: (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h: (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h: (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h: (__ASSUME_SET_ROBUST_LIST): Likewise. --- sysdeps/unix/sysv/linux/arm/kernel-features.h | 1 - sysdeps/unix/sysv/linux/kernel-features.h | 5 ----- sysdeps/unix/sysv/linux/mips/kernel-features.h | 1 - sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 - 4 files changed, 8 deletions(-) -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 6ca607e..4012751 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -24,7 +24,6 @@ configuration. */ #if __LINUX_KERNEL_VERSION < 0x030E03 # undef __ASSUME_REQUEUE_PI -# undef __ASSUME_SET_ROBUST_LIST #endif /* Define this if your 32-bit syscall API requires 64-bit register diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 1d3b554..6f11128 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -59,11 +59,6 @@ they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1. */ #define __ASSUME_ATFCTS 1 -/* Support for inter-process robust mutexes was added in 2.6.17 (but - some architectures lack futex_atomic_cmpxchg_inatomic in some - configurations). */ -#define __ASSUME_SET_ROBUST_LIST 1 - /* Support for private futexes was added in 2.6.22. */ #define __ASSUME_PRIVATE_FUTEX 1 diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index b486d90..3bcbcff 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -25,7 +25,6 @@ emulating LL/SC. */ #if __mips == 1 || defined _MIPS_ARCH_R5900 # undef __ASSUME_REQUEUE_PI -# undef __ASSUME_SET_ROBUST_LIST #endif /* Define this if your 32-bit syscall API requires 64-bit register diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 69c9c7c..dc7c4aa 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -35,5 +35,4 @@ futex_atomic_cmpxchg_inatomic. */ #if !defined __arch64__ && !defined __sparc_v9__ # undef __ASSUME_REQUEUE_PI -# undef __ASSUME_SET_ROBUST_LIST #endif