From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116371 invoked by alias); 26 Apr 2018 07:39:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 116361 invoked by uid 89); 26 Apr 2018 07:39:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=BAYES_00,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=consolidation X-HELO: smtp2200-217.mail.aliyun.com X-Alimail-AntiSpam:AC=CONTINUE;BC=0.0783451|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03271;MF=han_mao@c-sky.com;NM=1;PH=DS;RN=4;RT=4;SR=0;TI=SMTPD_---.BqYZqhn_1524728372; Date: Thu, 26 Apr 2018 07:39:00 -0000 From: Mao Han To: Adhemerval Zanella Cc: c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, libc-alpha@sourceware.org Subject: Re: [RFC PATCH V2 06/10] C-SKY: Linux Syscall Interface Message-ID: <20180426073931.GD15099@vmh-VirtualBox> References: <34f1011affb007e6cc1e4435ca0bd68f4ff4cfd4.1523169833.git.han_mao@c-sky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2018-04/txt/msg00562.txt.bz2 Hi, Thanks for the comment. On Mon, Apr 23, 2018 at 08:32:16AM -0300, Adhemerval Zanella wrote: > > +#ifdef __CSKYABIV2__ > > + int result = INLINE_SYSCALL (ftruncate64, 3, fd, > > + __LONG_LONG_PAIR (high, low)); > > +#else > > + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, > > + __LONG_LONG_PAIR (high, low)); > > +#endif > > + return result; > > +} > > +weak_alias (__ftruncate64, ftruncate64) > > If I understand correctly the ABIv1 requires oven register for 64 bit argument > passing, which is represented inside glibc as __ASSUME_ALIGNED_REGISTER_PAIRS > set to 1. So setting it correctly for ABIv1 should make it possible to use > the generic 'sysdeps/unix/sysv/linux/ftruncate64.c' for c-sky. > OK, I'll try the macro and the generic implementation. > > + > > +ssize_t > > +__readahead (int fd, off64_t offset, size_t count) > > +{ > > + return INLINE_SYSCALL_CALL (readahead, fd, > > + __ALIGNMENT_ARG SYSCALL_LL64 (offset), count); > > +} > > + > > +weak_alias (__readahead, readahead) > > I just sent a patch to consolidate Linux readahead implementation [1]. So most > likely this new arch-specific file for c-sky would be unnecessary. > > > > +++ b/sysdeps/unix/sysv/linux/csky/scandir64.c > > @@ -0,0 +1 @@ > > +#include > > The 'scandir{at}{64}' consolidation is pushed upstream [2], so this file should > be unnecessary as well. > > [1] https://sourceware.org/ml/libc-alpha/2018-04/msg00471.html > [2] https://sourceware.org/git/?p=glibc.git;a=commit;h=c0123b3b1118419210879e935620eb2ad987c2f1 OK, I'll change to the consolidated implementation. Best Regards, Mao Han