public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Yury Norov <ynorov@caviumnetworks.com>,
	Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org, linux-kernel@vger.kernel.org,
	arnd@arndb.de, catalin.marinas@arm.com, marcus.shawcroft@arm.com,
	philb@gnu.org, davem@davemloft.net, szabolcs.nagy@arm.com,
	maxim.kuvyrkov@linaro.org, pinskia@gmail.com,
	bamvor.zhangjian@huawei.com, schwab@suse.de, fweimer@redhat.com,
	Prasun.Kapoor@cavium.com, cmetcalf@mellanox.com,
	hjl.tools@gmail.com, Yury Norov <yury.norov@gmail.com>
Subject: Re: [PATCH 18/23] [AARCH64] ILP32: support stat syscall family
Date: Tue, 28 Jun 2016 20:42:00 -0000	[thread overview]
Message-ID: <5772E113.4000403@linaro.org> (raw)
In-Reply-To: <20160628185102.GA2592@yury-N73SV>



On 28/06/2016 16:08, Yury Norov wrote:
> On Tue, Jun 28, 2016 at 05:15:13PM +0000, Joseph Myers wrote:
>> <https://sourceware.org/ml/libc-alpha/2016-06/msg00791.html> still 
>> applies.  Unify implementations instead of proliferating variants.
> 
> I think on it. I don't see simple way to unify it right now. And I
> plan to take a vacation in next two weeks, so I'd like to share my 
> progress to community (mostly for kernel), as this series has some
> LTP tests fixed, and this is important for us.
> 
> What you talk about sounds unclear to me. If you mean to unify with
> one of existing ports, it looks unnecessary, as ilp32 will end up with 
> RISC-V anyway. If you mean to use RISC-V, it's not ready yet. I was
> thinking that when they will finish, they simply switch this port to
> their code. Am I too optimistic?

The idea is to avoid the proliferation of multiple implementation of
same function over multiple files.  This have the advantage to make
easy for new ports to add such functionality and simplify the code
base.  Take fstatfs{64} for instance:

$ find . -iname fstatfs*
./sysdeps/mach/hurd/fstatfs.c
./sysdeps/mach/hurd/fstatfs64.c
./sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
./sysdeps/unix/sysv/linux/alpha/fstatfs64.c
./sysdeps/unix/sysv/linux/fstatfs64.c
./sysdeps/unix/sysv/linux/wordsize-64/fstatfs64.c
./sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
./io/fstatfs.c
./io/fstatfs64.c

The 'io' is the default one which is just a stub that return ENOSYS.
For Linux ideally we should aim to have just one implementation that
cover all the architectures/kernel limitation (the same idea I am
pushing with some consolidation patches).

It might be outside the scope of the port enablement, but it is usually
the opportunity to the refactor on such code.  And for such functions
it might require some work for some architecture idiosyncrasies (such
as alpha not providing fstat64), but I think it quite doable. 


> 
>> Also, much of the formatting is way off the GNU Coding Standards (e.g. 
>> indentation that's not two-column, "{" not on a line by itself), and 
>> you're missing descriptions as first lines of many new files.
> 
> Is there glibc analogue for kernel scripts/checkpatch.pl? If yes,
> please point me out, and I'll briefly fix all issues. If no please be
> patient to whitespace rules violations. I completely understand the
> importance of following the coding rules, but now I am little limited
> in time and prefer to fix real bugs first, and then read that document
> carefully and check all the mess I introduced.

Also keep in mind to remove the 'Contributed by ...' presented in some
files.

> 
> Yury
> 

  reply	other threads:[~2016-06-28 20:42 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 16:40 [RFC2 PATCH 00/23] ARM64: support ILP32 Yury Norov
2016-06-28 16:40 ` [PATCH 02/23] [AARCH64] Add header guards to sysdep.h headers Yury Norov
2016-06-28 16:40 ` [PATCH 03/23] Add dynamic ILP32 AARCH64 relocations to elf.h Yury Norov
2016-06-28 17:03   ` Joseph Myers
2016-06-28 16:40 ` [PATCH 04/23] [AARCH64] Add PTR_REG, PTR_LOG_SIZE, and PTR_SIZE. Use it in LDST_PCREL and LDST_GLOBAL Yury Norov
2016-06-28 16:40 ` [PATCH 05/23] [AARCH64] Use PTR_REG in crti.S Yury Norov
2016-06-28 17:05   ` Joseph Myers
2016-06-28 16:40 ` [PATCH 01/23] [AARCH64] define word size for lp64 and ilp32 Yury Norov
2016-06-28 17:00   ` Joseph Myers
2016-06-28 17:31     ` Joseph Myers
2016-06-28 16:41 ` [PATCH 06/23] [AARCH64] Use PTR_REG/PTR_SIZE/PTR_SIZE_LOG in dl-tlsesc.S Yury Norov
2016-06-28 17:06   ` Joseph Myers
2016-06-28 16:41 ` [PATCH 09/23] [AARCH64] Use PTR_REG in getcontext.S Yury Norov
2016-06-28 16:41 ` [PATCH 07/23] [AARCH64] Use PTR_* macros in dl-trampoline.S Yury Norov
2016-06-28 16:42 ` [PATCH 16/23] [AARCH64] Make lp64 and ilp32 directories Yury Norov
2016-06-28 17:10   ` Joseph Myers
2016-06-29  8:44   ` Andreas Schwab
2016-06-28 16:42 ` [PATCH 11/23] [AARCH64] Add ILP32 support to elf_machine_load_address Yury Norov
2016-06-28 16:42 ` [PATCH 14/23] [AARCH64] Add ILP32 ld.so to the known interpreter names Yury Norov
2016-06-28 16:42 ` [PATCH 13/23] [AARCH64] Add support to ldconfig for ILP32 and libilp32 Yury Norov
2016-06-28 16:42 ` [PATCH 12/23] [AARCH64] Add ILP32 to makefiles Yury Norov
2016-06-28 16:42 ` [PATCH 08/23] [AARCH64] Use PTR_* in start.S Yury Norov
2016-06-28 16:43 ` [PATCH 20/23] [AARCH64] Fix ILP32 warning Yury Norov
2016-06-28 16:43 ` [PATCH 22/23] off_t: fix register pair calculation for 64-bit case Yury Norov
2016-06-28 17:17   ` Joseph Myers
2016-06-28 16:43 ` [PATCH 18/23] [AARCH64] ILP32: support stat syscall family Yury Norov
2016-06-28 17:15   ` Joseph Myers
2016-06-28 19:08     ` Yury Norov
2016-06-28 20:42       ` Adhemerval Zanella [this message]
2016-06-28 20:46       ` Joseph Myers
2016-06-29  6:57   ` Andreas Schwab
2016-06-29  9:21   ` Andreas Schwab
2016-06-28 16:43 ` [PATCH 10/23] [AARCH64] Detect ILP32 in configure scripts Yury Norov
2016-06-28 17:08   ` Joseph Myers
2016-06-28 17:31     ` Yury Norov
2016-06-28 17:36       ` Joseph Myers
2016-06-28 16:43 ` [PATCH 17/23] [AARCH64] ILP32: introduce syscalls that pass off_t Yury Norov
2016-06-28 17:13   ` Joseph Myers
2016-06-29 10:11   ` Andreas Schwab
2016-06-29 12:05     ` Andreas Schwab
2016-06-28 16:43 ` [PATCH 23/23] [AARCH64] Take utmp{,x}.h from s390 port Yury Norov
2016-06-28 17:18   ` Joseph Myers
2016-06-28 18:00     ` Yury Norov
2016-06-28 20:39       ` Joseph Myers
2016-06-28 20:43       ` Adhemerval Zanella
2016-06-28 16:43 ` [PATCH 19/23] [AARCH64] delouse input arguments in system functions Yury Norov
2016-06-28 17:15   ` Joseph Myers
2016-06-29  7:49   ` Andreas Schwab
2016-06-28 16:43 ` [PATCH 21/23] [AARCH64] Make __SIZEOF_SEM_T 16 for ILP32 Yury Norov
2016-06-28 17:16   ` Joseph Myers
2016-06-29  7:55   ` Andreas Schwab
2016-06-28 16:43 ` [PATCH 15/23] [AARCH64] Add ldd-rewrite.sed so that ilp32 ld.so can be found Yury Norov
2016-06-28 16:57 ` [RFC2 PATCH 00/23] ARM64: support ILP32 Joseph Myers
2016-06-28 17:32 ` Adhemerval Zanella
2016-07-05  7:34 ` Andreas Schwab
2016-07-08 15:12 ` Yury Norov
2016-09-08  4:36 ` Zhangjian (Bamvor)
2016-09-08 11:38   ` Yury Norov
2016-09-08 11:59     ` Zhangjian (Bamvor)

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=5772E113.4000403@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=Prasun.Kapoor@cavium.com \
    --cc=arnd@arndb.de \
    --cc=bamvor.zhangjian@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=cmetcalf@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.shawcroft@arm.com \
    --cc=maxim.kuvyrkov@linaro.org \
    --cc=philb@gnu.org \
    --cc=pinskia@gmail.com \
    --cc=schwab@suse.de \
    --cc=szabolcs.nagy@arm.com \
    --cc=ynorov@caviumnetworks.com \
    --cc=yury.norov@gmail.com \
    /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).