From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [RFC PATCH V2 06/10] C-SKY: Linux Syscall Interface
Date: Mon, 23 Apr 2018 11:32:00 -0000 [thread overview]
Message-ID: <a29e2e26-4258-718c-9746-1900e1a642b8@linaro.org> (raw)
In-Reply-To: <34f1011affb007e6cc1e4435ca0bd68f4ff4cfd4.1523169833.git.han_mao@c-sky.com>
On 08/04/2018 04:02, Mao Han wrote:
> diff --git a/sysdeps/unix/sysv/linux/csky/ftruncate64.c b/sysdeps/unix/sysv/linux/csky/ftruncate64.c
> new file mode 100644
> index 0000000..47c38e6
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/ftruncate64.c
> @@ -0,0 +1,41 @@
> +/* Truncate the file FD refers to to LENGTH bytes. */
> +int
> +__ftruncate64 (int fd, off64_t length)
> +{
> + unsigned int low = length & 0xffffffff;
> + unsigned int high = length >> 32;
> +#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.
> diff --git a/sysdeps/unix/sysv/linux/csky/readahead.c b/sysdeps/unix/sysv/linux/csky/readahead.c
> new file mode 100644
> index 0000000..255361c
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/readahead.c
> @@ -0,0 +1,34 @@
> +
> +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.
> diff --git a/sysdeps/unix/sysv/linux/csky/scandir64.c b/sysdeps/unix/sysv/linux/csky/scandir64.c
> new file mode 100644
> index 0000000..506fd88
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/scandir64.c
> @@ -0,0 +1 @@
> +#include <sysdeps/unix/sysv/linux/i386/scandir64.c>
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
next prev parent reply other threads:[~2018-04-23 11:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 7:03 [RFC PATCH V2 00/10] port C-SKY to glibc Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 06/10] C-SKY: Linux Syscall Interface Mao Han
2018-04-15 20:29 ` Arnd Bergmann
2018-04-16 5:55 ` Mao Han
2018-04-23 11:32 ` Adhemerval Zanella [this message]
2018-04-26 7:39 ` Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 04/10] C-SKY: Hard Float Support Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 02/10] C-SKY: TLS support Mao Han
2018-04-17 20:50 ` Joseph Myers
2018-04-26 7:33 ` Mao Han
2018-04-26 16:00 ` Joseph Myers
2018-04-27 1:55 ` Guo Ren
2018-04-27 12:10 ` Joseph Myers
2018-04-29 8:49 ` Guo Ren
2018-04-08 7:03 ` [RFC PATCH V2 05/10] C-SKY: Atomic and Locking Routines Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 09/10] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 08/10] C-SKY: Build Infastructure Mao Han
2018-04-08 7:41 ` Andreas Schwab
2018-04-16 5:59 ` Mao Han
2018-04-17 20:54 ` Joseph Myers
2018-04-08 7:03 ` [RFC PATCH V2 03/10] C-SKY: Generic math Routines Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 07/10] C-SKY: ABI Lists Mao Han
2018-04-09 22:25 ` Rafal Luzynski
2018-04-10 0:59 ` Mao Han
2018-04-08 7:03 ` [RFC PATCH V2 01/10] C-SKY: ABI related code Mao Han
2018-04-17 20:53 ` Joseph Myers
2018-04-26 7:27 ` Mao Han
2018-04-08 7:04 ` [RFC PATCH V2 10/10] C-SKY: Linux ABI Mao Han
2018-04-17 20:56 ` Joseph Myers
2018-04-08 7:51 ` [RFC PATCH V2 00/10] port C-SKY to glibc Florian Weimer
2018-04-08 8:29 ` Mao Han
2018-04-09 8:43 ` Florian Weimer
2018-04-09 9:05 ` Mao Han
2018-04-17 20:44 ` Joseph Myers
[not found] ` <20180426072022.GA14714@vmh-VirtualBox>
2018-04-26 11:45 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a29e2e26-4258-718c-9746-1900e1a642b8@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).