From: Firoz Khan <firoz.khan@linaro.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Chris Zankel <chris@zankel.net>,
linux-xtensa@linux-xtensa.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Thomas Gleixner <tglx@linutronix.de>,
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>,
Arnd Bergmann <arnd@arndb.de>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [PATCH v2 1/3] xtensa: add __NR_syscalls along with __NR_syscall_count
Date: Thu, 15 Nov 2018 15:35:23 +0530 [thread overview]
Message-ID: <CALxhOnhBN3ibNku5z4ZwnRjnWEtSrsbyVQUDzJkT6U65Ek0H+g@mail.gmail.com> (raw)
In-Reply-To: <CAMo8BfJGWgJrsg858nwO_845HQOSMNm4AxEqjEjVsSMZMG1Gzw@mail.gmail.com>
Hi Max,
On Wed, 14 Nov 2018 at 05:19, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Hi Firoz,
>
> I have one more question:
>
> On Tue, Nov 13, 2018 at 2:20 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > The 2nd option will be the recommended one. For that, I
> > added the __NR_syscalls macro in uapi/asm/unistd.h along
> > with __NR_syscall_count asm/unistd.h. The macro __NR_sys-
> > calls also added 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. We also need to enclose
> > this macro with #ifdef __KERNEL__ to avoid side effects.
>
> Looking at the include/uapi/asm-generic/unistd.h I see that
> __NR_syscalls is not guarded by the #ifdef __KERNEL__,
> why should it be guarded for xtensa?
__NR_syscalls for kernel. So this macro is present in asm/unistd.h
rather than uapi/asm/unistd.h. As I mentioned in the patch, it would
be better to keep in uapi/asm/unistd.h to count the number of syscalls.
But this will create some side effect. So I was guarded with __KERNEL__.
In order to come up with common implementation, I kept this for all
architecture.
>
> If we remove __NR_syscall_count from the uapi header I'd
> suggest dropping it completely and switching its two current
> users to __NR_syscalls.
I'm not removing the __NR_syscall_count macro; just place it
in asm/unistd.h file for the above reason.
FYI, I made sure that the kernel will build with my patch. I would
appreciate if you can perform the boot test on the actual platform.
Thanks
Firoz
>
> --
> Thanks.
> -- Max
next prev parent reply other threads:[~2018-11-15 10:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 10:19 [PATCH v2 0/3] xtensa: system call table generation support Firoz Khan
2018-11-13 10:19 ` [PATCH v2 1/3] xtensa: add __NR_syscalls along with __NR_syscall_count Firoz Khan
2018-11-13 23:49 ` Max Filippov
2018-11-15 10:05 ` Firoz Khan [this message]
2018-11-15 19:45 ` Max Filippov
2018-11-16 5:48 ` Firoz Khan
2018-11-13 10:19 ` [PATCH v2 2/3] xtensa: add system call table generation support Firoz Khan
2018-11-13 10:19 ` [PATCH v2 3/3] xtensa: generate uapi header and syscall table header files Firoz Khan
2018-11-13 23:53 ` [PATCH v2 0/3] xtensa: system call table generation support Max Filippov
2018-11-15 9:57 ` Firoz Khan
2018-11-15 20:16 ` Max Filippov
2018-11-16 5:47 ` 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=CALxhOnhBN3ibNku5z4ZwnRjnWEtSrsbyVQUDzJkT6U65Ek0H+g@mail.gmail.com \
--to=firoz.khan@linaro.org \
--cc=arnd@arndb.de \
--cc=chris@zankel.net \
--cc=deepa.kernel@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jcmvbkbc@gmail.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.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).