From patchwork Thu Feb 19 13:44:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 441607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 422B814012A for ; Fri, 20 Feb 2015 00:44:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 85A00A3774; Thu, 19 Feb 2015 13:44:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CFk-lWfS-WIJ; Thu, 19 Feb 2015 13:44:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 871C4A3743; Thu, 19 Feb 2015 13:44:40 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 58CA61C2393 for ; Thu, 19 Feb 2015 13:44:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 524FF95689 for ; Thu, 19 Feb 2015 13:44:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YHTSpNp7ldfH for ; Thu, 19 Feb 2015 13:44:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by hemlock.osuosl.org (Postfix) with ESMTPS id BD6A395682 for ; Thu, 19 Feb 2015 13:44:38 +0000 (UTC) Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 6BC9510C0D15; Thu, 19 Feb 2015 05:44:38 -0800 (PST) Received: from dc8secmta2.internal.synopsys.com (dc8secmta2.internal.synopsys.com [127.0.0.1]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 5BC39A4112; Thu, 19 Feb 2015 05:44:38 -0800 (PST) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 2B100A4102; Thu, 19 Feb 2015 05:44:38 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 20C4A772; Thu, 19 Feb 2015 05:44:38 -0800 (PST) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 1817E771; Thu, 19 Feb 2015 05:44:38 -0800 (PST) Received: from US02VWCASHYB2.internal.synopsys.com (10.12.237.252) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 19 Feb 2015 05:44:38 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by US02VWCASHYB2.internal.synopsys.com (10.12.237.252) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 19 Feb 2015 05:44:37 -0800 Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.105) by IN01WEHTCA.internal.synopsys.com (10.144.199.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 19 Feb 2015 19:14:35 +0530 Received: from vineetg-E7440.internal.synopsys.com (10.12.196.223) by IN01WEHTCB.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 19 Feb 2015 19:14:33 +0530 From: Vineet Gupta To: Subject: [PATCH v2 4/4] sync_file_range: fix standard UCLIBC_SYSCALL_ALIGN_64BIT handling Date: Thu, 19 Feb 2015 19:14:02 +0530 Message-ID: <1424353442-18949-5-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424353442-18949-1-git-send-email-vgupta@synopsys.com> References: <1424353442-18949-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.12.196.223] Cc: Vineet Gupta X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Currently UCLIBC_SYSCALL_ALIGN_64BIT is not explicitly handled. Fix that and make sure the special handling is done for powerpc/xtensa which use UCLIBC_SYSCALL_ALIGN_64BIT but don't use hole punched syscall handler in kernel. Signed-off-by: Vineet Gupta Cc: Baruch Siach Cc: Max Filippov --- libc/sysdeps/linux/common/sync_file_range.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/common/sync_file_range.c b/libc/sysdeps/linux/common/sync_file_range.c index 6cd7e94d6af6..db797de6272a 100644 --- a/libc/sysdeps/linux/common/sync_file_range.c +++ b/libc/sysdeps/linux/common/sync_file_range.c @@ -24,7 +24,11 @@ static int __NC(sync_file_range)(int fd, off64_t offset, off64_t nbytes, unsigne { # if defined __powerpc__ && __WORDSIZE == 64 return INLINE_SYSCALL(sync_file_range, 4, fd, flags, offset, nbytes); -# elif defined __mips__ && _MIPS_SIM == _ABIO32 +# elif (defined __mips__ && _MIPS_SIM == _ABIO32) || \ + (defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) && !(defined(__powerpc__) || defined(__xtensa__))) + /* arch with 64-bit data in even reg alignment #2: [arcv2/others-in-future] + * stock syscall handler in kernel (reg hole punched) + * see libc/sysdeps/linux/common/posix_fadvise.c for more details */ return INLINE_SYSCALL(sync_file_range, 7, fd, 0, OFF64_HI_LO(offset), OFF64_HI_LO(nbytes), flags); # elif defined __NR_sync_file_range2