From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65489 invoked by alias); 20 Dec 2017 17:24:37 -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 65316 invoked by uid 89); 20 Dec 2017 17:24:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Wed, 20 Dec 2017 17:24:00 -0000 From: Joseph Myers To: Palmer Dabbelt CC: , Andrew Waterman , Darius Rad , Subject: Re: [PATCH v2 10/15] RISC-V: Linux Syscall Interface In-Reply-To: <20171220072022.26909-11-palmer@dabbelt.com> Message-ID: References: <20171220072022.26909-1-palmer@dabbelt.com> <20171220072022.26909-11-palmer@dabbelt.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-12/txt/msg00758.txt.bz2 On Tue, 19 Dec 2017, Palmer Dabbelt wrote: > diff --git a/sysdeps/unix/sysv/linux/riscv/getmsg.c b/sysdeps/unix/sysv/linux/riscv/getmsg.c > new file mode 100644 > index 000000000000..3a1fa0852504 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/riscv/getmsg.c > @@ -0,0 +1 @@ > +#include Really? I don't see getpmsg in the generic or RISC-V syscall ABI. > diff --git a/sysdeps/unix/sysv/linux/riscv/kernel-features.h b/sysdeps/unix/sysv/linux/riscv/kernel-features.h My comments from still apply: you shouldn't need this file. > diff --git a/sysdeps/unix/sysv/linux/riscv/putmsg.c b/sysdeps/unix/sysv/linux/riscv/putmsg.c > new file mode 100644 > index 000000000000..ebc1680ca7d1 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/riscv/putmsg.c > @@ -0,0 +1 @@ > +#include Same comment as for getmsg. > diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/readahead.c b/sysdeps/unix/sysv/linux/riscv/rv32/readahead.c > new file mode 100644 > index 000000000000..80170c3e8a4d > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/riscv/rv32/readahead.c > @@ -0,0 +1 @@ > +#include I commented on this before . Are you sure about it? The ARM file is dealing with a peculiarity of the syscall interface in the case where (a) it follows the C function interface and (b) a 32-bit function argument followed by a 64-bit function argument requires a one-register gap between them. Now, RISC-V doesn't seem to do anything special for this syscall in the kernel, so I presume it does follow the C function interface. But says that aligned register pairs are only used for variadic arguments, and readahead is not a variadic function. So I'd expect there not to be a gap in the arguments to this syscall, and so use of the ARM function to be wrong. (As the syscall has no errors and no testable semantic effect, as long as the fd argument is valid, getting this wrong would not result in any test failures.) > +#ifdef __ASSEMBLER__ > + > +#include > + > +#define ENTRY(name) LEAF(name) Missing preprocessor indentation here and subsequently (inconsistently) in this file. > +#endif /* linux/mips/sysdep.h */ This comment is clearly wrong here. -- Joseph S. Myers joseph@codesourcery.com