[PATCH 10/12] RISC-V: Linux Syscall Interface

Joseph Myers joseph@codesourcery.com
Wed Jun 14 21:20:00 GMT 2017


On Wed, 14 Jun 2017, Palmer Dabbelt wrote:

> diff --git a/sysdeps/unix/sysv/linux/riscv/kernel-features.h b/sysdeps/unix/sysv/linux/riscv/kernel-features.h
> new file mode 100644
> index 0000000000..2db504b53b
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/riscv/kernel-features.h
> @@ -0,0 +1,22 @@
> +/* Copyright (C) 2014, 2017 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#define __ASSUME_ACCEPT4_SYSCALL	1
> +#define __ASSUME_RECVMMSG_SYSCALL	1
> +#define __ASSUME_SENDMMSG_SYSCALL	1

These are all the default now; you shouldn't need this header.

> 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 0000000000..80170c3e8a
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/riscv/rv32/readahead.c
> @@ -0,0 +1 @@
> +#include <sysdeps/unix/sysv/linux/arm/readahead.c>

Is it really a good idea for your kernel port to replicate the ARM 
peculiarity regarding the arguments to this syscall?

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list