From patchwork Wed Mar 2 08:25:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 590882 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 40C8414029E for ; Wed, 2 Mar 2016 19:25:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=j0dYuGtP; dkim-atps=neutral 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:in-reply-to :references; q=dns; s=default; b=Me/Cq55ZvzmXKQMszmgSlK7+LcNY4CD EiiMeNhSI3m9UL1pts0zki1ysmUw9qUl1bcB72R5/RSGM1l3hFtxze8mjC7zGrQV NUBGx6KlqgP4t5dhbov1tHUzgQeTsIN/POor7W70MkeeWbIHTvF8+/wsWygcy24U miQEuVm2oDA0= 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:in-reply-to :references; s=default; bh=kvLjNtFEREjOrWCcLmsCH2Qq5EU=; b=j0dYu GtPjiNtCx0ZrSqbHhQgyYBxmhuq85vIv/1e7zXrijgtHf2i/5JbAc7tJ+yY2CeWl jnL8+dzxcNYGPO4cis6nRyBmLZNOb0clicrHGzq2uzBLtvKSYtGqXRwm1oqopy/F ggqWpUN+uxtJbHwjNQpFIIdgVOrkSrBRVxJ4AI= Received: (qmail 84575 invoked by alias); 2 Mar 2016 08:25:48 -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 84524 invoked by uid 89); 2 Mar 2016 08:25:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=326, 2.7.0, Hx-languages-length:1907, Direct X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: "David S . Miller" , Aurelien Jarno Subject: [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc Date: Wed, 2 Mar 2016 09:25:23 +0100 Message-Id: <1456907123-6199-3-git-send-email-aurelien@aurel32.net> In-Reply-To: <1456907123-6199-1-git-send-email-aurelien@aurel32.net> References: <1456907123-6199-1-git-send-email-aurelien@aurel32.net> Direct socket syscalls have been added in kernel 4.4 on sparc for bind, listen and setsockopt. Other direct socket syscalls were present before kernel 3.2 and are listed directly in syscalls.list, so there is no need to add them there. Changelog: * sysdeps/unix/sysv/linux/sparc/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL): New macro. [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. --- ChangeLog | 7 +++++++ sysdeps/unix/sysv/linux/sparc/kernel-features.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index f01786b..65aef07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen, setsockopt): Remove. + * sysdeps/unix/sysv/linux/sparc/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL): + New macro. + [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL): + Likewise. 2016-03-01 H.J. Lu diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 3a7baa7..6a40cfc 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -32,6 +32,13 @@ #define __ASSUME_SENDMMSG_SYSCALL 1 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL 1 +/* Direct socketcalls available for SPARC in 4.4. */ +#if __LINUX_KERNEL_VERSION >= 0x040400 +# define __ASSUME_BIND_SYSCALL 1 +# define __ASSUME_LISTEN_SYSCALL 1 +# define __ASSUME_SETSOCKOPT_SYSCALL 1 +#endif + #include_next /* 32-bit SPARC kernels do not support