All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: Will Drewry <wad@chromium.org>,
	linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Mike Frysinger <vapier@gentoo.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC,PATCH] arch/arm: compute and export NR_syscalls
Date: Wed, 17 Aug 2011 11:22:48 +0200	[thread overview]
Message-ID: <201108171122.49009.arnd@arndb.de> (raw)
In-Reply-To: <20043.28045.613130.691498@pilspetsen.it.uu.se>

On Wednesday 17 August 2011, Mikael Pettersson wrote:
>  > I proposed this approach based solely on prior threads I've seen. E.g.,
>  > - https://lkml.org/lkml/2007/6/1/427
>  >   (don't just #define)
>  > - https://lkml.org/lkml/2009/8/27/280
>  >   (todo: x86-32 to move to x86-64)
>  > 
>  > If a single line #define is good enough, then it certainly works for me.
> 
> Yes, the one-line #define NR_syscalls in unistd.h is a perfectly adequate,
> if not entirely elegant, solution.  Adding asm-export.c just for this is
> waaay overkill.

Right. While the main problem with having the constant in asm/unistd.h
(needs to be kept in sync when adding new syscalls) is an annoyance,
the suggested approach is adding more complexity than necessary.

If you want to have the value automatically computed, I'd suggest
moving the format of unistd.h over to a method like the one used
by x86-64 and asm-generic, which is to combine the syscall number
definitions with the list of syscall pointers that currently reside
in arch/arm/kernel/calls.S, for the added benefit that it's easier to
keep the two in sync as well.

The main question is what Russell's preference is on the alternatives.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC,PATCH] arch/arm: compute and export NR_syscalls
Date: Wed, 17 Aug 2011 11:22:48 +0200	[thread overview]
Message-ID: <201108171122.49009.arnd@arndb.de> (raw)
In-Reply-To: <20043.28045.613130.691498@pilspetsen.it.uu.se>

On Wednesday 17 August 2011, Mikael Pettersson wrote:
>  > I proposed this approach based solely on prior threads I've seen. E.g.,
>  > - https://lkml.org/lkml/2007/6/1/427
>  >   (don't just #define)
>  > - https://lkml.org/lkml/2009/8/27/280
>  >   (todo: x86-32 to move to x86-64)
>  > 
>  > If a single line #define is good enough, then it certainly works for me.
> 
> Yes, the one-line #define NR_syscalls in unistd.h is a perfectly adequate,
> if not entirely elegant, solution.  Adding asm-export.c just for this is
> waaay overkill.

Right. While the main problem with having the constant in asm/unistd.h
(needs to be kept in sync when adding new syscalls) is an annoyance,
the suggested approach is adding more complexity than necessary.

If you want to have the value automatically computed, I'd suggest
moving the format of unistd.h over to a method like the one used
by x86-64 and asm-generic, which is to combine the syscall number
definitions with the list of syscall pointers that currently reside
in arch/arm/kernel/calls.S, for the added benefit that it's easier to
keep the two in sync as well.

The main question is what Russell's preference is on the alternatives.

	Arnd

  reply	other threads:[~2011-08-17  9:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16 21:14 [RFC,PATCH] arch/arm: compute and export NR_syscalls Will Drewry
2011-08-16 21:14 ` Will Drewry
2011-08-16 21:21 ` Arnd Bergmann
2011-08-16 21:21   ` Arnd Bergmann
2011-08-16 21:44   ` Will Drewry
2011-08-16 21:44     ` Will Drewry
2011-08-17  7:28     ` Mikael Pettersson
2011-08-17  7:28       ` Mikael Pettersson
2011-08-17  9:22       ` Arnd Bergmann [this message]
2011-08-17  9:22         ` Arnd Bergmann
2011-08-21  9:07         ` Russell King - ARM Linux
2011-08-21  9:07           ` Russell King - ARM Linux
2011-08-22  0:43           ` Will Drewry
2011-08-22  0:43             ` Will Drewry

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=201108171122.49009.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ebiederm@xmission.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mikpe@it.uu.se \
    --cc=vapier@gentoo.org \
    --cc=wad@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.