linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Adam J. Richter" <adam@yggdrasil.com>,
	linux-kernel@vger.kernel.org
Subject: Re: linux-2.4.6-pre6: numerous dep_{bool,tristate} $CONFIG_ARCH_xxx bugs
Date: Sat, 30 Jun 2001 21:45:30 +1000	[thread overview]
Message-ID: <3465.993901530@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Sat, 30 Jun 2001 10:20:24 +0100." <20010630102024.A12009@flint.arm.linux.org.uk>

On Sat, 30 Jun 2001 10:20:24 +0100, 
Russell King <rmk@arm.linux.org.uk> wrote:
>Err, how can $BAR be undefined?  Configure sets all config variables which
>are answered with 'n' to 'n'.

if [ "$CONFIG_xyz" = "y" ]; then
  bool CONFIG_bar
fi

CONFIG_bar can be undefined, not 'n'.  While that can cause problems,
it is also valid config code.  If I interpret AC's cryptic comments
correctly, there may be code which assumes that undefined variables are
just that, undefined.  Setting all variables to 'n' initially by Adam's
script will break such code.

This type of code treats undefined variables as "don't care", not as
"forbidden".  Is there any such code?  I don't know for sure, but I am
sure that a change of this magnitude does not belong in 2.4.

The problem Adam was trying to fix was

  dep_bool CONFIG_bar $CONFIG_ARCH_foo

where if the arch is not foo then bar is incorrectly allowed because
CONFIG_ARCH_foo is undefined.  IMHO it is safe to assume that all arch
dependent config settings are meant to be off if the arch is not
selected, i.e. setting CONFIG_ARCH_foo=n for all arch except the
current one is safe.  Setting _all_ CONFIG_foo=n for all variables is
not safe.

I still think this is the best approach, against 2.4.5-ac22.

Index: 5.54/arch/config.in
--- 5.54/arch/config.in Sat, 30 Jun 2001 21:43:30 +1000 kaos ()
+++ 5.54(w)/arch/config.in Sat, 30 Jun 2001 21:42:15 +1000 kaos (linux-2.4/D/e/15_config.in  644)
@@ -0,0 +1,21 @@
+# Ensure that all arch settings are off except the one that is selected.  This
+# simplifies arch dependent driver selection.  Each architecture's specific
+# config variable must appear in this list.  All arch's must include this file
+# at the start of arch/*/config.in.
+
+define_bool CONFIG_ALPHA n
+define_bool CONFIG_ARCH_CRIS n
+define_bool CONFIG_ARCH_M68K n
+define_bool CONFIG_ARCH_S390 n
+define_bool CONFIG_ARCH_S390X n
+define_bool CONFIG_ARM n
+define_bool CONFIG_IA64 n
+define_bool CONFIG_MIPS n
+define_bool CONFIG_MIPS_64 n
+define_bool CONFIG_PARISC n
+define_bool CONFIG_PPC n
+define_bool CONFIG_SPARC32 n
+define_bool CONFIG_SPARC64 n
+define_bool CONFIG_SUPERH n
+define_bool CONFIG_USERMODE n
+define_bool CONFIG_X86 n
Index: 5.54/arch/parisc/config.in
--- 5.54/arch/parisc/config.in Sun, 22 Apr 2001 08:14:43 +1000 kaos (linux-2.4/l/c/33_config.in 1.1.2.1 644)
+++ 5.54(w)/arch/parisc/config.in Sat, 30 Jun 2001 21:27:43 +1000 kaos (linux-2.4/l/c/33_config.in 1.1.2.1 644)
@@ -3,6 +3,8 @@
 # see the Configure script.
 #
 
+source arch/config.in
+
 mainmenu_name "Linux Kernel Configuration"
 
 define_bool CONFIG_PARISC y
Index: 5.54/arch/s390/config.in
--- 5.54/arch/s390/config.in Sun, 22 Apr 2001 08:14:43 +1000 kaos (linux-2.4/n/c/39_config.in 1.4 644)
+++ 5.54(w)/arch/s390/config.in Sat, 30 Jun 2001 21:27:50 +1000 kaos (linux-2.4/n/c/39_config.in 1.4 644)
@@ -3,6 +3,8 @@
 # see Documentation/kbuild/config-language.txt.
 #
 
+source arch/config.in
+
 define_bool CONFIG_ISA n
 define_bool CONFIG_EISA n
 define_bool CONFIG_MCA n
Index: 5.54/arch/mips64/config.in
--- 5.54/arch/mips64/config.in Wed, 20 Jun 2001 13:07:10 +1000 kaos (linux-2.4/p/c/34_config.in 1.2.1.1.1.2 644)
+++ 5.54(w)/arch/mips64/config.in Sat, 30 Jun 2001 21:42:08 +1000 kaos (linux-2.4/p/c/34_config.in 1.2.1.1.1.2 644)
@@ -2,6 +2,11 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
+define_bool CONFIG_ARCH_MIPS64 y
+
 mainmenu_name "Linux Kernel Configuration"
 
 mainmenu_option next_comment
Index: 5.54/arch/ia64/config.in
--- 5.54/arch/ia64/config.in Sun, 22 Apr 2001 07:25:55 +1000 kaos (linux-2.4/s/c/38_config.in 1.1.2.1.3.1.1.2 644)
+++ 5.54(w)/arch/ia64/config.in Sat, 30 Jun 2001 21:29:08 +1000 kaos (linux-2.4/s/c/38_config.in 1.1.2.1.3.1.1.2 644)
@@ -1,3 +1,5 @@
+source arch/config.in
+
 mainmenu_name "Kernel configuration of Linux for IA-64 machines"
 
 mainmenu_option next_comment
Index: 5.54/arch/sh/config.in
--- 5.54/arch/sh/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/t/c/42_config.in 1.1.1.1.1.1 644)
+++ 5.54(w)/arch/sh/config.in Sat, 30 Jun 2001 21:29:32 +1000 kaos (linux-2.4/t/c/42_config.in 1.1.1.1.1.1 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux/SuperH Kernel Configuration"
 
 define_bool CONFIG_SUPERH y
Index: 5.54/arch/arm/config.in
--- 5.54/arch/arm/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/x/c/32_config.in 1.3.1.2.1.1 644)
+++ 5.54(w)/arch/arm/config.in Sat, 30 Jun 2001 21:28:43 +1000 kaos (linux-2.4/x/c/32_config.in 1.3.1.2.1.1 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux Kernel Configuration"
 
 define_bool CONFIG_ARM y
Index: 5.54/arch/sparc64/config.in
--- 5.54/arch/sparc64/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/z/c/48_config.in 1.11.1.1 644)
+++ 5.54(w)/arch/sparc64/config.in Sat, 30 Jun 2001 21:29:37 +1000 kaos (linux-2.4/z/c/48_config.in 1.11.1.1 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see the Configure script.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux/UltraSPARC Kernel Configuration"
 
 mainmenu_option next_comment
Index: 5.54/arch/m68k/config.in
--- 5.54/arch/m68k/config.in Wed, 06 Jun 2001 11:47:52 +1000 kaos (linux-2.4/E/c/5_config.in 1.1.1.4 644)
+++ 5.54(w)/arch/m68k/config.in Sat, 30 Jun 2001 21:40:20 +1000 kaos (linux-2.4/E/c/5_config.in 1.1.1.4 644)
@@ -3,6 +3,9 @@
 # see Documentation/kbuild/config-language.txt.
 #
 
+source arch/config.in
+
+define_bool CONFIG_ARCH_M68K y
 define_bool CONFIG_UID16 y
 define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
 define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
Index: 5.54/arch/ppc/config.in
--- 5.54/arch/ppc/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/H/c/11_config.in 1.2.1.1.2.4.1.1 644)
+++ 5.54(w)/arch/ppc/config.in Sat, 30 Jun 2001 21:29:25 +1000 kaos (linux-2.4/H/c/11_config.in 1.2.1.1.2.4.1.1 644)
@@ -3,6 +3,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 define_bool CONFIG_UID16 n
 define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
 define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
Index: 5.54/arch/mips/config.in
--- 5.54/arch/mips/config.in Wed, 20 Jun 2001 13:07:10 +1000 kaos (linux-2.4/M/c/48_config.in 1.1.1.1.1.2 644)
+++ 5.54(w)/arch/mips/config.in Sat, 30 Jun 2001 21:29:13 +1000 kaos (linux-2.4/M/c/48_config.in 1.1.1.1.1.2 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 define_bool CONFIG_MIPS y
 define_bool CONFIG_SMP n
 
Index: 5.54/arch/sparc/config.in
--- 5.54/arch/sparc/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/P/c/8_config.in 1.3.1.2.1.1 644)
+++ 5.54(w)/arch/sparc/config.in Sat, 30 Jun 2001 21:29:35 +1000 kaos (linux-2.4/P/c/8_config.in 1.3.1.2.1.1 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux/SPARC Kernel Configuration"
 
 define_bool CONFIG_UID16 y
Index: 5.54/arch/alpha/config.in
--- 5.54/arch/alpha/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/R/c/33_config.in 1.1.1.1.1.5 644)
+++ 5.54(w)/arch/alpha/config.in Sat, 30 Jun 2001 21:27:01 +1000 kaos (linux-2.4/R/c/33_config.in 1.1.1.1.1.5 644)
@@ -3,6 +3,8 @@
 # see Documentation/kbuild/config-language.txt.
 #
 
+source arch/config.in
+
 define_bool CONFIG_ALPHA y
 define_bool CONFIG_UID16 n
 define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
Index: 5.54/arch/i386/config.in
--- 5.54/arch/i386/config.in Fri, 29 Jun 2001 11:31:04 +1000 kaos (linux-2.4/T/c/36_config.in 1.1.2.1.3.1.1.9 644)
+++ 5.54(w)/arch/i386/config.in Sat, 30 Jun 2001 21:28:59 +1000 kaos (linux-2.4/T/c/36_config.in 1.1.2.1.3.1.1.9 644)
@@ -2,6 +2,9 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux Kernel Configuration"
 
 define_bool CONFIG_X86 y
Index: 5.54/arch/cris/config.in
--- 5.54/arch/cris/config.in Wed, 20 Jun 2001 13:07:10 +1000 kaos (linux-2.4/m/d/45_config.in 1.2.1.5 644)
+++ 5.54(w)/arch/cris/config.in Sat, 30 Jun 2001 21:40:14 +1000 kaos (linux-2.4/m/d/45_config.in 1.2.1.5 644)
@@ -2,8 +2,12 @@
 # For a description of the syntax of this configuration file,
 # see the Configure script.
 #
+
+source arch/config.in
+
 mainmenu_name "Linux/CRIS Kernel Configuration"
 
+define_bool CONFIG_ARCH_CRIS y
 define_bool CONFIG_UID16 y
 define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
 define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
Index: 5.54/arch/s390x/config.in
--- 5.54/arch/s390x/config.in Sun, 22 Apr 2001 08:14:43 +1000 kaos (linux-2.4/q/d/3_config.in 1.3 644)
+++ 5.54(w)/arch/s390x/config.in Sat, 30 Jun 2001 21:27:53 +1000 kaos (linux-2.4/q/d/3_config.in 1.3 644)
@@ -3,6 +3,8 @@
 # see Documentation/kbuild/config-language.txt.
 #
 
+source arch/config.in
+
 define_bool CONFIG_ISA n
 define_bool CONFIG_EISA n
 define_bool CONFIG_MCA n
Index: 5.54/arch/um/config.in
--- 5.54/arch/um/config.in Sat, 16 Jun 2001 09:05:21 +1000 kaos (linux-2.4/U/d/26_config.in 1.4 644)
+++ 5.54(w)/arch/um/config.in Sat, 30 Jun 2001 21:29:42 +1000 kaos (linux-2.4/U/d/26_config.in 1.4 644)
@@ -1,5 +1,6 @@
-define_bool CONFIG_USERMODE y
+source arch/config.in
 
+define_bool CONFIG_USERMODE y
 mainmenu_name "Linux/Usermode Kernel Configuration"
 
 define_bool CONFIG_ISA y


  parent reply	other threads:[~2001-06-30 11:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-30  4:35 linux-2.4.6-pre6: numerous dep_{bool,tristate} $CONFIG_ARCH_xxx bugs Adam J. Richter
2001-06-30  7:26 ` Alan Cox
2001-06-30  9:20   ` Russell King
2001-06-30 11:43     ` Alan Cox
2001-06-30 11:58       ` Russell King
2001-06-30 12:01         ` Alan Cox
2001-06-30 12:02           ` Russell King
2001-06-30 11:45     ` Keith Owens [this message]
2001-06-30 12:10       ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2001-06-30 14:57 Adam J. Richter
2001-06-30 15:01 ` Russell King
2001-07-01  2:39   ` Keith Owens
2001-06-30 13:32 Adam J. Richter
2001-06-30  9:38 Adam J. Richter
2001-06-30  4:40 Adam J. Richter
2001-06-30  7:23 ` Alan Cox
2001-06-29 14:10 Adam J. Richter
2001-06-29 14:21 ` Keith Owens
2001-06-29 14:30   ` Russell King
2001-06-29 14:41     ` Keith Owens
2001-06-29 15:19     ` Alan Cox
2001-06-29 14:30 ` Jeff Garzik

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=3465.993901530@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=adam@yggdrasil.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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).