From: Firoz Khan <firoz.khan@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k <linux-m68k@lists.linux-m68k.org>,
y2038 Mailman List <y2038@lists.linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [PATCH 2/4] m68k: Replace NR_syscalls macro from asm/unistd.h
Date: Tue, 18 Sep 2018 12:46:54 +0530 [thread overview]
Message-ID: <CALxhOnheD75br1X_A7h5cNYWdjrDn4ciPc++mYd-_oZJApJyZg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdVR+GKwT8WwjZy+=8j=ndWJ0s0sVnCGFGtsyvPAY9jnHQ@mail.gmail.com>
On 9 August 2018 at 13:00, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Firoz,
>
> One first comment below...
>
> On Thu, Aug 9, 2018 at 7:16 AM Firoz Khan <firoz.khan@linaro.org> wrote:
>> NR_syscalls macro holds the number of system call exist in m68k
>> architecture. This macro is currently the part of asm/unistd.h file.
>> We have to change the value of NR_syscalls, if we add or delete a
>> system call.
>>
>> One of patch in this patch series has a script which will generate
>> a uapi header based on syscall.tbl file. The syscall.tbl file
>> contains the number of system call information. So we have two
>> option to update NR_syscalls value.
>>
>> 1. Update NR_syscalls in asm/unistd.h manually by counting the
>> no.of system calls. No need to update NR_syscalls untill
>> we either add a new system call or delete an existing system
>> call.
>>
>> 2. We can keep this feature it above mentioned script, that'll
>> count the number of syscalls and keep it in a generated file.
>> In this case we don't need to explicitly update NR_syscalls
>> in asm/unistd.h file.
>>
>> The 2nd option will be the recommended one. For that, I moved the
>> NR_syscalls macro from asm/unistd.h to uapi/asm/unistd.h. The macro
>> name also changed form NR_syscalls to __NR_syscalls for making the
>> name convention same across all architecture. While __NR_syscalls
>> isn't strictly part of the uapi, having it as part of the generated
>> header to simplifies the implementation.
>
> It can indeed not be part of the UAPI, as UAPI definitions can never change,
> while new syscalls will be added in the future, increasing the number ;-)
Thanks for your reply :)
Sorry for the delayed response :(
I would like to keep __NR_syscalls macro to uapi header in order to simplify
the system call table generation script. Otherwise the __NR_syscalls
macro need to update manually. That become a problem.
Please check the below implementation in uapi file make sense?
It is an easy workaround to leave __NR_syscalls macro in uapi/asm/unistd.h
and enclose it in #ifdef __KERNEL__
...
...
#define __NR_pwritev2 378
#define __NR_statx 379
#ifdef __KERNEL__
#define __NR_syscalls 380
#endif
...
...
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
next prev parent reply other threads:[~2018-09-18 7:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 5:15 [PATCH 0/4] System call table generation support Firoz Khan
2018-08-09 5:15 ` [PATCH 1/4] m68k: Rename system call table file name Firoz Khan
2018-08-09 5:15 ` [PATCH 2/4] m68k: Replace NR_syscalls macro from asm/unistd.h Firoz Khan
2018-08-09 7:30 ` Geert Uytterhoeven
2018-09-18 7:16 ` Firoz Khan [this message]
2018-09-18 10:04 ` Geert Uytterhoeven
2018-09-18 12:17 ` Firoz Khan
2018-09-20 8:12 ` Firoz Khan
2018-09-20 9:24 ` Geert Uytterhoeven
2018-09-22 11:33 ` Firoz Khan
2018-08-09 5:15 ` [PATCH 3/4] m68k: Added system call table generation support Firoz Khan
2018-08-09 7:36 ` Andreas Schwab
2018-09-18 7:22 ` Firoz Khan
2018-08-09 5:15 ` [PATCH 4/4] m68k: uapi header and system call table file generation 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=CALxhOnheD75br1X_A7h5cNYWdjrDn4ciPc++mYd-_oZJApJyZg@mail.gmail.com \
--to=firoz.khan@linaro.org \
--cc=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=marcin.juszkiewicz@linaro.org \
--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).