From: Adrian Bunk The 2.6 Kconfig language allows to set the range for integer questions. The patch below adds a range line on all architectures that have a NR_CPUS question except ia64. The help text on ia64 didn't suggest any values. Could someone tell the correct values for ia64 (and if it's only a minimum value of 2)? --- arch/alpha/Kconfig | 1 + arch/i386/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/ppc/Kconfig | 1 + arch/ppc64/Kconfig | 1 + arch/s390/Kconfig | 2 ++ arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/sparc64/Kconfig | 1 + arch/um/Kconfig | 1 + arch/x86_64/Kconfig | 1 + 12 files changed, 13 insertions(+) diff -puN arch/alpha/Kconfig~use-kconfig-range-for-NR_CPUS arch/alpha/Kconfig --- 25/arch/alpha/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/alpha/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -509,6 +509,7 @@ config HAVE_DEC_LOCK config NR_CPUS int "Maximum number of CPUs (2-64)" + range 2 64 depends on SMP default "64" diff -puN arch/i386/Kconfig~use-kconfig-range-for-NR_CPUS arch/i386/Kconfig --- 25/arch/i386/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/i386/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -447,6 +447,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-255)" + range 2 255 depends on SMP default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000 default "8" diff -puN arch/mips/Kconfig~use-kconfig-range-for-NR_CPUS arch/mips/Kconfig --- 25/arch/mips/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/mips/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -981,6 +981,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "32" help diff -puN arch/parisc/Kconfig~use-kconfig-range-for-NR_CPUS arch/parisc/Kconfig --- 25/arch/parisc/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/parisc/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -154,6 +154,7 @@ config HPUX config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "32" diff -puN arch/ppc64/Kconfig~use-kconfig-range-for-NR_CPUS arch/ppc64/Kconfig --- 25/arch/ppc64/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/ppc64/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -97,6 +97,7 @@ config IRQ_ALL_CPUS config NR_CPUS int "Maximum number of CPUs (2-128)" + range 2 128 depends on SMP default "32" diff -puN arch/ppc/Kconfig~use-kconfig-range-for-NR_CPUS arch/ppc/Kconfig --- 25/arch/ppc/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/ppc/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -681,6 +681,7 @@ config IRQ_ALL_CPUS config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "4" diff -puN arch/s390/Kconfig~use-kconfig-range-for-NR_CPUS arch/s390/Kconfig --- 25/arch/s390/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/s390/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -97,6 +97,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP && ARCH_S390X = 'n' default "32" help @@ -109,6 +110,7 @@ config NR_CPUS config NR_CPUS int "Maximum number of CPUs (2-64)" + range 2 64 depends on SMP && ARCH_S390X default "64" help diff -puN arch/sh/Kconfig~use-kconfig-range-for-NR_CPUS arch/sh/Kconfig --- 25/arch/sh/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/sh/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -467,6 +467,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "2" help diff -puN arch/sparc64/Kconfig~use-kconfig-range-for-NR_CPUS arch/sparc64/Kconfig --- 25/arch/sparc64/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/sparc64/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -128,6 +128,7 @@ config PREEMPT config NR_CPUS int "Maximum number of CPUs (2-64)" + range 2 64 depends on SMP default "64" diff -puN arch/sparc/Kconfig~use-kconfig-range-for-NR_CPUS arch/sparc/Kconfig --- 25/arch/sparc/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/sparc/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -112,6 +112,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "32" diff -puN arch/um/Kconfig~use-kconfig-range-for-NR_CPUS arch/um/Kconfig --- 25/arch/um/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/um/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -128,6 +128,7 @@ config SMP config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "32" diff -puN arch/x86_64/Kconfig~use-kconfig-range-for-NR_CPUS arch/x86_64/Kconfig --- 25/arch/x86_64/Kconfig~use-kconfig-range-for-NR_CPUS 2004-01-08 17:57:40.000000000 -0800 +++ 25-akpm/arch/x86_64/Kconfig 2004-01-08 17:57:40.000000000 -0800 @@ -233,6 +233,7 @@ config HAVE_DEC_LOCK # to use clustered mode or whatever your big iron needs config NR_CPUS int "Maximum number of CPUs (2-8)" + range 2 8 depends on SMP default "8" help _