From: Arnd Bergmann <arnd@arndb.de>
To: Firoz Khan <firoz.khan@linaro.org>
Cc: Parisc List <linux-parisc@vger.kernel.org>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Helge Deller <deller@gmx.de>,
Thomas Gleixner <tglx@linutronix.de>,
gregkh <gregkh@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
y2038 Mailman List <y2038@lists.linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [PATCH v4 3/6] parisc: add system call table generation support
Date: Fri, 12 Oct 2018 13:51:04 +0200 [thread overview]
Message-ID: <CAK8P3a1Ua0c9H006=_m=EHUufoUX5-d-m9fZcL_sF4mMJuLhkQ@mail.gmail.com> (raw)
In-Reply-To: <1539337442-3676-4-git-send-email-firoz.khan@linaro.org>
On Fri, Oct 12, 2018 at 11:45 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
> new file mode 100644
> index 0000000..a0af5a3
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/Makefile
> +syshdr_abi_unistd_32 := common,32
> +syshdr_offset_unistd_32 := __NR_Linux
> +$(uapi)/unistd_32.h: $(syscall) $(syshdr)
> + $(call if_changed,syshdr)
> +
> +syshdr_abi_unistd_64 := common,64
> +syshdr_offset_unistd_64 := __NR_Linux
> +$(uapi)/unistd_64.h: $(syscall) $(syshdr)
> + $(call if_changed,syshdr)
The __NR_Linux seems misplaced here, don't we need that only for ia64
and mips?
> +systbl_abi_syscall_table_32 := common,32
> +$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
> + $(call if_changed,systbl)
> +
> +systbl_abi_syscall_table_64 := common,64
> +$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
> + $(call if_changed,systbl)
Have you considered making the 'common' part implied?
I expected to see it done that way, although listing it explicitly
doesn't seem harmful either.
> +systbl_abi_syscall_table_c32 := common,compat,32
> +$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
> + $(call if_changed,systbl)
The way you specify 'compat' as one item in a list of
ABIs seems rather odd, I'd suggest keeping that a separate
flag.
I think you can also pass arguments to 'if_changed', rather than
setting a global variable to control it.
arch/powerpc/boot/Makefile has some examples of that.
It should be possible to do this like
$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
$(call if_changed,systbl,common|32,compat)
Passing "common|32" as the list of ABIs in the first argument,
and 'compat' as the second argument.
> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> new file mode 100644
> index 0000000..7c9f268
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
...
> +346 common copy_file_range sys_copy_file_range
> +347 common preadv2 sys_preadv2 compat_sys_preadv2
> +348 common pwritev2 sys_pwritev2 compat_sys_pwritev2
> +349 common statx sys_statx
> +350 common io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents
> \ No newline at end of file
Here is the missing newline again. This should never happen if your text
editor is configured correctly.
> diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
> new file mode 100644
> index 0000000..607d4ca
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
> @@ -0,0 +1,35 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +in="$1"
> +out="$2"
> +my_abis=`echo "($3)" | tr ',' '|'`
> +prefix="$4"
> +offset="$5"
> +
> +fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
> + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
> + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
Maybe use ${ARCH} instead of PARISC here to keep it the same
across architectures?
> + my_abi="$(cut -d'|' -f2 <<< $my_abis)"
> + while read nr abi name entry compat ; do
> + if [ $my_abi = "compat" ]; then
This check seems really fragile, but if you add another argument to the
script instead of listing "compat" as the second option in the
list of ABIs, I think it's fine.
ARnd
next prev parent reply other threads:[~2018-10-12 11:51 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 9:43 [PATCH v4 0/6] parisc: system call table generation support Firoz Khan
2018-10-12 9:43 ` Firoz Khan
2018-10-12 9:43 ` [PATCH v4 1/6] parisc: move __IGNORE* entries to non uapi header Firoz Khan
2018-10-12 9:43 ` Firoz Khan
2018-10-12 9:43 ` [PATCH v4 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Firoz Khan
2018-10-12 9:43 ` Firoz Khan
2018-10-12 9:43 ` [PATCH v4 3/6] parisc: add system call table generation support Firoz Khan
2018-10-12 9:43 ` Firoz Khan
2018-10-12 10:18 ` Firoz Khan
2018-10-12 10:18 ` Firoz Khan
2018-10-12 11:51 ` Arnd Bergmann [this message]
2018-10-12 11:51 ` Arnd Bergmann
2018-10-13 15:34 ` Firoz Khan
2018-10-13 15:34 ` Firoz Khan
2018-10-12 12:07 ` Rolf Eike Beer
2018-10-12 12:07 ` Rolf Eike Beer
2018-10-12 13:57 ` Firoz Khan
2018-10-12 13:57 ` Firoz Khan
2018-10-12 14:03 ` Rolf Eike Beer
2018-10-12 14:03 ` Rolf Eike Beer
2018-10-15 4:48 ` Firoz Khan
2018-10-15 4:48 ` Firoz Khan
2018-10-15 5:16 ` Rolf Eike Beer
2018-10-15 5:16 ` Rolf Eike Beer
2018-10-15 5:45 ` Firoz Khan
2018-10-15 5:45 ` Firoz Khan
2018-10-14 1:06 ` Eugene Syromiatnikov
2018-10-14 1:06 ` Eugene Syromiatnikov
2018-10-15 5:12 ` Firoz Khan
2018-10-15 5:12 ` Firoz Khan
2018-10-12 9:44 ` [PATCH v4 4/6] parisc: uapi header and system call table file generation Firoz Khan
2018-10-12 9:44 ` Firoz Khan
2018-10-12 9:44 ` [PATCH v4 5/6] parisc: wire up rseq system call Firoz Khan
2018-10-12 9:44 ` Firoz Khan
2018-10-12 9:56 ` Arnd Bergmann
2018-10-12 9:56 ` Arnd Bergmann
2018-10-12 10:16 ` Firoz Khan
2018-10-12 10:16 ` Firoz Khan
2018-10-12 11:52 ` Arnd Bergmann
2018-10-12 11:52 ` Arnd Bergmann
2018-10-12 20:23 ` Helge Deller
2018-10-12 20:23 ` Helge Deller
2018-10-13 5:42 ` Firoz Khan
2018-10-13 5:42 ` Firoz Khan
2018-10-12 9:44 ` [PATCH v4 6/6] parisc: syscalls: Ignore nfsservctl for other architectures Firoz Khan
2018-10-12 9:44 ` Firoz Khan
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='CAK8P3a1Ua0c9H006=_m=EHUufoUX5-d-m9fZcL_sF4mMJuLhkQ@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=deller@gmx.de \
--cc=firoz.khan@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@parisc-linux.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=marcin.juszkiewicz@linaro.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
--cc=y2038@lists.linaro.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 NNTP newsgroup(s).