All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] centralizing arch-specific kernel config settings
@ 2007-04-26 11:06 Robert P. J. Day
  2007-04-26 12:39 ` Matthew Wilcox
  2007-04-26 12:57 ` Robert P. J. Day
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-04-26 11:06 UTC (permalink / raw)
  To: kernel-janitors


  i noticed just yesterday the apparent redundancy in duplicating
arch-related kernel config settings across a number of Kconfig files,
as in:

$ grep "config GENERIC_BUG" $(find . -name Kconfig)
./arch/x86_64/Kconfig:config GENERIC_BUG
./arch/i386/Kconfig:config GENERIC_BUG
./arch/ppc/Kconfig:config GENERIC_BUG
./arch/um/Kconfig:config GENERIC_BUG
./arch/parisc/Kconfig:config GENERIC_BUG
./arch/powerpc/Kconfig:config GENERIC_BUG
$

in all of the above cases, the Kconfig directive looks like:

...
config GENERIC_BUG
        bool
        default y
        depends on BUG
...

so the obvious purpose is to define the config setting GENERIC_BUG for
a specific and relevant subset of the supported architectures.  but
isn't this a bit silly and overly verbose?  something like this could
just as easily (and more cleanly) be done using something like this in
init/Kconfig:

...
config AUDITSYSCALL
        bool "Enable system-call auditing support"
        depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64)
        default y if SECURITY_SELINUX
...

clearly, a single setting in init/Kconfig now defines AUDITSYSCALL for
just the appropriate subset of architectures, rather than spreading
that across multiple arch-specific Kconfig files.  the same technique
is used for UID16 in that same file:

...
config UID16
        bool "Enable 16-bit UID system calls" if EMBEDDED
        depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) ...
...

  is there any reason config settings like GENERIC_BUG can't be
centralized in a single place like that?  i'm *guessing* a pile of
config settings could be simplified like this.

rday

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ] centralizing arch-specific kernel config settings
  2007-04-26 11:06 [KJ] centralizing arch-specific kernel config settings Robert P. J. Day
@ 2007-04-26 12:39 ` Matthew Wilcox
  2007-04-26 12:57 ` Robert P. J. Day
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2007-04-26 12:39 UTC (permalink / raw)
  To: kernel-janitors

On Thu, Apr 26, 2007 at 07:06:56AM -0400, Robert P. J. Day wrote:
> in all of the above cases, the Kconfig directive looks like:
> 
> ...
> config GENERIC_BUG
>         bool
>         default y
>         depends on BUG
> ...

It should proably use def_bool y instead of bool, default y.

>   is there any reason config settings like GENERIC_BUG can't be
> centralized in a single place like that?  i'm *guessing* a pile of
> config settings could be simplified like this.

Is it simpler?
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ] centralizing arch-specific kernel config settings
  2007-04-26 11:06 [KJ] centralizing arch-specific kernel config settings Robert P. J. Day
  2007-04-26 12:39 ` Matthew Wilcox
@ 2007-04-26 12:57 ` Robert P. J. Day
  1 sibling, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-04-26 12:57 UTC (permalink / raw)
  To: kernel-janitors

On Thu, 26 Apr 2007, Matthew Wilcox wrote:

> On Thu, Apr 26, 2007 at 07:06:56AM -0400, Robert P. J. Day wrote:
> > in all of the above cases, the Kconfig directive looks like:
> >
> > ...
> > config GENERIC_BUG
> >         bool
> >         default y
> >         depends on BUG
> > ...
>
> It should proably use def_bool y instead of bool, default y.

i agree, but there's a bazillion of the slightly longer form, and i
doubt it's worth trying to change them over (unless someone wants to
take that on as a KJ project and do it an architecture at a time).

> >   is there any reason config settings like GENERIC_BUG can't be
> > centralized in a single place like that?  i'm *guessing* a pile of
> > config settings could be simplified like this.
>
> Is it simpler?

it's definitely shorter, but i'm guessing it's probably *conceptually*
easier for each architecture to look after its own "generic" settings,
even if it's more verbose.  so never mind, it was just a thought.

rday

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-26 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 11:06 [KJ] centralizing arch-specific kernel config settings Robert P. J. Day
2007-04-26 12:39 ` Matthew Wilcox
2007-04-26 12:57 ` Robert P. J. Day

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.