public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Will Newton <will.newton@gmail.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org
Subject: Re: [RFC] Introduce __ARCH_WANT_SYS_SYSFS
Date: Wed, 23 Apr 2008 20:44:47 +0200	[thread overview]
Message-ID: <20080423184447.GA6024@uranus.ravnborg.org> (raw)
In-Reply-To: <87a5b0800804230736k340e7fe9mffbd72b5b8164015@mail.gmail.com>

On Wed, Apr 23, 2008 at 03:36:23PM +0100, Will Newton wrote:
> On Tue, Apr 22, 2008 at 4:38 PM, Kyle McMartin <kyle@mcmartin.ca> wrote:
> > On Tue, Apr 22, 2008 at 04:34:03PM +0100, Will Newton wrote:
> >  > On Tue, Apr 22, 2008 at 4:24 PM, Kyle McMartin <kyle@mcmartin.ca> wrote:
> >  > > On Tue, Apr 22, 2008 at 04:16:17PM +0100, Will Newton wrote:
> >  > >  > It can be done with Kconfig. Whether it should be or not depends on
> >  > >  > your point of view, hence RFC. Currently __ARCH_WANT macros is the way
> >  > >  > syscalls are enabled and disabled across architectures. If there's
> >  > >  > consensus that it should be done via Kconfig that could certainly be
> >  > >  > implmented, but that's a different patch.
> >  > >  >
> >  > >
> >  > >  It's currently done in unistd.h for hysterical raisins. All new
> >  > >  conditional syscalls have been done in Kconfig.
> >  >
> >  > Do you have a syscall in mind that does this in the correct way?
> >  >
> >
> >  epoll is the most immediate example at hand, since it touches
> >  fs/compat.c similarly to how you would be touching fs/filesystem.c, and
> >  touches kernel/sys_ni.c and init/Kconfig in much the same way.
> 
> I implemented the approach you suggested - Kconfig symbol and
> cond_syscall definition. I think I actually like the previous approach
> better:
> 
> 1. The arch Kconfig files are quite non-uniform compared to unistd.h
> so the definitions wind up at different places in the file which is a
> bit messy.
> 2. Changes to Kconfig may cause churn in defconfigs perhaps?
> 3. There is more churn in arch Kconfig than unistd.h so getting a
> cross arch patch applied is likely to be more difficult.
> 4. The patch is about 4 times as many lines.
> 
> What do you think?

If we go the Kconfig route we should use the
HAVE_ semantic as expressed by the patch below.
It is preferable to defining a config symbol for each
arch.
This also address your point 1) and 4)
2) is not an issue since the symbols are not visible.

	Sam

Note: cut'n'pasted...

diff --git a/arch/Kconfig b/arch/Kconfig
index 694c9af..759bd5b 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -36,3 +36,9 @@ config HAVE_KPROBES

 config HAVE_KRETPROBES
        def_bool n
+
+# syscall symbols.
+# archs shall select the SYMBOL if they
+# implment this syscall
+config HAVE_SYS_SYSFS
+       defbool n
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 87a693c..487310f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -24,6 +24,8 @@ config X86
        select HAVE_KRETPROBES
        select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
        select HAVE_ARCH_KGDB
+       # kconfig selectable syscalls
+       select HAVE_SYS_SYSFS


  parent reply	other threads:[~2008-04-23 18:44 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 12:13 [RFC] Introduce __ARCH_WANT_SYS_SYSFS Will Newton
2008-04-22 13:15 ` Arnd Bergmann
2008-04-23 21:16   ` Michal Simek
2008-04-23 21:38     ` Mike Frysinger
2008-04-24 11:11     ` microblaze syscall list Arnd Bergmann
2008-04-24 18:42       ` Michal Simek
2008-04-24 21:21         ` Arnd Bergmann
2008-04-25  9:36         ` [microblaze-uclinux] " John Williams
2008-04-25 10:06           ` Matthew Wilcox
2008-04-25 11:32             ` Geert Uytterhoeven
2008-04-27  2:04             ` John Williams
2008-04-27 15:52               ` Michal Simek
2008-04-27 16:50                 ` Alan Cox
2008-04-27 20:15                 ` Arnd Bergmann
2008-04-28  0:15                   ` John Williams
2008-04-28 12:31                     ` Arnd Bergmann
2008-05-01 19:17                       ` Arnd Bergmann
2008-05-02  5:38                         ` John Williams
2008-05-02  8:18                           ` Michal Simek
2008-05-03  3:49                             ` John Williams
2008-05-03  9:16                               ` Arnd Bergmann
2008-05-03 15:56                                 ` Ulrich Drepper
2008-05-03 21:14                                   ` Arnd Bergmann
2008-05-05  1:09                                 ` John Williams
2008-05-05 14:08                                   ` Arnd Bergmann
2008-05-03 21:57                 ` Arnd Bergmann
2008-05-04  9:12                   ` Michal Simek
2008-05-04 19:37                     ` Arnd Bergmann
2008-05-05  6:18                       ` Michal Simek
2008-05-04 22:09                     ` H. Peter Anvin
2008-05-04 22:54                       ` Arnd Bergmann
2008-05-04 22:53                         ` H. Peter Anvin
2008-05-06  8:33                       ` Michal Simek
2008-04-24 20:51       ` Michal Simek
2008-04-24 21:37         ` Arnd Bergmann
2008-04-22 15:12 ` [RFC] Introduce __ARCH_WANT_SYS_SYSFS Randy Dunlap
2008-04-22 15:16   ` Will Newton
2008-04-22 15:24     ` Kyle McMartin
2008-04-22 15:34       ` Will Newton
2008-04-22 15:38         ` Kyle McMartin
2008-04-23 14:36           ` Will Newton
2008-04-23 14:59             ` Arnd Bergmann
2008-04-23 15:40             ` Kyle McMartin
2008-04-23 15:50               ` Will Newton
2008-04-23 16:05                 ` Mike Frysinger
2008-04-23 17:59                   ` Mike Frysinger
2008-04-24  9:18                     ` Will Newton
2008-04-23 18:44             ` Sam Ravnborg [this message]
2008-04-24 14:51   ` Adrian Bunk
2008-04-22 15:21 ` Kyle McMartin
2008-04-22 15:38   ` Arnd Bergmann
2008-04-22 15:42     ` Kyle McMartin

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=20080423184447.GA6024@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=kyle@mcmartin.ca \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=will.newton@gmail.com \
    /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