From patchwork Fri May 12 17:58:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99720 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431629qge; Fri, 12 May 2017 11:00:24 -0700 (PDT) X-Received: by 10.99.168.1 with SMTP id o1mr5568056pgf.105.1494612024126; Fri, 12 May 2017 11:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612024; cv=none; d=google.com; s=arc-20160816; b=NoEZDGp+gk/YKg3lmOIuzUnTBbSJcdWSTA8dqe+SYHJocS6C0hIpw8+ntzfXXMmVw3 5weJSA4B1yrN/j/Wc19Bu4n/5DubFdVsf0JERfEyTf7Ha6mkg9eStLD1BzU1ORJXdYKH g435bsBJL06x90hAIuNCbjXqTMLGr+0KSmWV2B8+j3YQ7qzEdCsowuKEn1SkH4copsjj NfdvhNUYyLiNV/KpR3UyZjb+/LizLsCUochxiUJI7CIBypX1OxmbWtq9Rm5Aqxrp9wBf 9woU3r8VyrrbZGxSCkjCs0hKrHx29yub8TJc1DfOI4wu2J9UDM0yRA8b0kLA99xgaem2 BBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=tgnSZWwyTUAiEvmn0n/ceZgMAyJdY5Z5NTM1G/AIM1M=; b=iV/VemDB/WRoGDSGg9hPK5vER8q1lJP1mF9y38y0PDdmMeFbLiDOCwdAJMb2NNfgJ/ MCyJAStnKezijvFKc6hnQsiCqjEQopu2omyE9bC235dtfGblm/yVpbWTTNVgjARKaCGs p6siMwgfdip4pfRlG4zPXFYoawLm99VRcxx7d0UnKdsahj6KpLDT0EKBAEGRWIIxNtlo UFEeiHZrsNu+x3iIpIpXIhR9c9rEPLm9PJOSupAl6LPJkKyysTqH73+fxrO1OhY6jiaI okP7NVhj+u4YgV6L/Z3zmOTMeYMzZynLQmoQhPaOgomrdoSY5i5ts5WdgWV2bczy1Jri FtwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79383-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79383-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a5si3792514plh.187.2017.05.12.11.00.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79383-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-79383-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79383-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=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=O1p6rOIZAfej7NvPWf0vZRef790SS+T MFt2I39q4j0IrZyqoI5bkEbbsqm8JCCebRj8fJGnMvUgUzdyIPgDrhd2hvhiwMer z08UTo9MdcNuczAdq+qscNgfOhsJ9KH7xPpV+C74+4Ph9wpR9IGHfKYhsok4yk+L wye3c0tXgJy4= 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=eM1PJ3qhmfHOPGkAnIn1kxu/a60=; b=TlzVh sWf4drGMTBX+tduWiOXYk6yxZf3+6clq63afFDk5YQsHkoKrAg2dbM1zUSDLCyUo eIbZSWSlWIIuUE0o8LkLKzuUatN7YANfr3/JsEY128UCKEYnjgwRoSTe3MmxL9Yb RKblgeFF0oTeoHagTN1xE5+DyVHAQ4TU4fNBeo= Received: (qmail 43651 invoked by alias); 12 May 2017 17:58:35 -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 43312 invoked by uid 89); 12 May 2017 17:58:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f177.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=tgnSZWwyTUAiEvmn0n/ceZgMAyJdY5Z5NTM1G/AIM1M=; b=PYehI0r2QwreNi4P6qxAUAlYCtHSFcM26W0iZV1F+uL+N7/OZMtBnU3OHZmx6qnEpv ZQ62aH/rzS9rF7zfna9i1KV/TdUAhd210c1XGTR70QEfeoZPRqOrTB7g7xgN4qkPfKhE 0tTotQr1L6gvSqpuBzolKz8wAlzmSZr5oAoCkfYXun/uw1guVK8qExUZaVadsLtCsSgY RpniIy9Qe4npVqUC8vQNl+2oClrzBMtk0wTFQl8NTYwz0V6GtlYKGB9Wui9M7Zb1eCaI ZJ8mw4RWnDR1UE1ZMdR+gKccaPxAny/Jk8ixNzc6W1f39x9NHKWJuixp1s5SQfmle6ry roeQ== X-Gm-Message-State: AODbwcA3Qi2WQn3RgbsqHLqdEK5N569uYIlrnntVIJAAlapJvCAcoxi0 pi3epE5iI2isLAJ+cniLSQ== X-Received: by 10.200.35.110 with SMTP id b43mr5020483qtb.24.1494611912238; Fri, 12 May 2017 10:58:32 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 09/13] linux: Consolidate Linux vmsplice syscall Date: Fri, 12 May 2017 14:58:10 -0300 Message-Id: <1494611894-9282-9-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the vmsplice Linux syscall generation on sysdeps/unix/sysv/linux/vmsplice.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-vmsplice.c): New flag. * sysdeps/unix/sysv/linux/syscalls.list (vmsplice): Remove from auto-generation syscall list. * sysdeps/unix/sysv/linux/vmsplice.c: New file. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/syscalls.list | 1 - sysdeps/unix/sysv/linux/vmsplice.c | 27 +++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/vmsplice.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index acdd04c..492963b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk))) sysdep_routines += clone umount umount2 readahead \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ - personality epoll_wait tee + personality epoll_wait tee vmsplice CFLAGS-gethostid.c = -fexceptions CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))" diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index c69eff4..9d7bd65 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -72,7 +72,6 @@ swapoff - swapoff i:s __swapoff swapoff unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23 utime - utime i:sP utime -vmsplice EXTRA vmsplice Ci:iPii vmsplice wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown diff --git a/sysdeps/unix/sysv/linux/vmsplice.c b/sysdeps/unix/sysv/linux/vmsplice.c new file mode 100644 index 0000000..01dac13 --- /dev/null +++ b/sysdeps/unix/sysv/linux/vmsplice.c @@ -0,0 +1,27 @@ +/* Splice user pages into a pipe Linux implementation. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + +ssize_t +vmsplice (int fd, const struct iovec *iov, size_t count, unsigned int flags) +{ + return SYSCALL_CANCEL (vmsplice, fd, iov, count, flags); +}