2012-10-03 16:45:21

by Catalin Marinas

[permalink] [raw]
Subject: [PATCH 0/4] Clean up some long arch conditionals

As pointed out by Linus, there are Kconfig or .c files with long
condition checks listing several architectures. These patches attempt to
solve some of them.

Sorry for the long cc but given that the patches are trivial it's not
worth submitting individual patches for each architecture.

Catalin Marinas (4):
Clean up the long arch list for the UID16 config option
Clean up the long arch list for the DEBUG_KMEMLEAK config option
Clean up the long arch list for the DEBUG_BUGVERBOSE config option
Clean up the "#if defined(arch)" list for exception-trace sysctl
entry

arch/arm/Kconfig | 2 ++
arch/arm64/Kconfig | 4 ++++
arch/blackfin/Kconfig | 1 +
arch/cris/Kconfig | 1 +
arch/frv/Kconfig | 2 ++
arch/h8300/Kconfig | 1 +
arch/m32r/Kconfig | 1 +
arch/m68k/Kconfig | 2 ++
arch/microblaze/Kconfig | 1 +
arch/mips/Kconfig | 1 +
arch/powerpc/Kconfig | 2 ++
arch/s390/Kconfig | 3 +++
arch/sh/Kconfig | 3 +++
arch/sparc/Kconfig | 5 +++++
arch/tile/Kconfig | 3 +++
arch/um/Kconfig.common | 1 +
arch/x86/Kconfig | 4 ++++
init/Kconfig | 11 +++++++++--
kernel/sysctl.c | 3 +--
lib/Kconfig.debug | 16 ++++++++--------
20 files changed, 55 insertions(+), 12 deletions(-)


2012-10-03 16:47:45

by Catalin Marinas

[permalink] [raw]
Subject: [PATCH 2/4] Clean up the long arch list for the DEBUG_KMEMLEAK config option

This patch introduces HAVE_DEBUG_KMEMLEAK config option and selects it
in corresponding architecture Kconfig files. DEBUG_KMEMLEAK now only
depends on HAVE_DEBUG_KMEMLEAK.

Signed-off-by: Catalin Marinas <[email protected]>
Cc: Russell King <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
---
arch/arm/Kconfig | 1 +
arch/arm64/Kconfig | 1 +
arch/microblaze/Kconfig | 1 +
arch/mips/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/s390/Kconfig | 1 +
arch/sh/Kconfig | 1 +
arch/sparc/Kconfig | 1 +
arch/tile/Kconfig | 1 +
arch/x86/Kconfig | 1 +
lib/Kconfig.debug | 8 ++++----
11 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 63ff281..a39477a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@ config ARM
select GENERIC_STRNLEN_USER
select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN
select HAVE_UID16
+ select HAVE_DEBUG_KMEMLEAK
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e61acae..5dc9273 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -10,6 +10,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HARDIRQS_SW_RESEND
select HAVE_ARCH_TRACEHOOK
+ select HAVE_DEBUG_KMEMLEAK
select HAVE_DMA_API_DEBUG
select HAVE_DMA_ATTRS
select HAVE_GENERIC_DMA_COHERENT
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index ab9afca..61b5d9f 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -24,6 +24,7 @@ config MICROBLAZE
select GENERIC_CPU_DEVICES
select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS
+ select HAVE_DEBUG_KMEMLEAK

config SWAP
def_bool n
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index faf6528..e04b95b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -36,6 +36,7 @@ config MIPS
select BUILDTIME_EXTABLE_SORT
select GENERIC_CLOCKEVENTS
select GENERIC_CMOS_UPDATE
+ select HAVE_DEBUG_KMEMLEAK

menu "Machine selection"

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 352f416..63c640d 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -139,6 +139,7 @@ config PPC
select GENERIC_CLOCKEVENTS
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
+ select HAVE_DEBUG_KMEMLEAK

config EARLY_PRINTK
bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 4de3a85..d3216d7 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -133,6 +133,7 @@ config S390
select KTIME_SCALAR if 32BIT
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_UID16 if 32BIT
+ select HAVE_DEBUG_KMEMLEAK

config SCHED_OMIT_FRAME_POINTER
def_bool y
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index fa6e2f1..cb5a22e 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -36,6 +36,7 @@ config SUPERH
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select HAVE_UID16
+ select HAVE_DEBUG_KMEMLEAK
help
The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 931eaed..a69bc77b 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -70,6 +70,7 @@ config SPARC64
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select HAVE_C_RECORDMCOUNT
select NO_BOOTMEM
+ select HAVE_DEBUG_KMEMLEAK

config ARCH_DEFCONFIG
string
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index c9a3c1f..afb3abd 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -17,6 +17,7 @@ config TILE
select SYS_HYPERVISOR
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CLOCKEVENTS
+ select HAVE_DEBUG_KMEMLEAK

# FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2e84642..6995d6b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -105,6 +105,7 @@ config X86
select GENERIC_STRNLEN_USER
select HAVE_RCU_USER_QS if X86_64
select HAVE_IRQ_TIME_ACCOUNTING
+ select HAVE_DEBUG_KMEMLEAK

config INSTRUCTION_DECODER
def_bool y
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 35c4565..63dfc4c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -449,12 +449,12 @@ config SLUB_STATS
out which slabs are relevant to a particular load.
Try running: slabinfo -DA

+config HAVE_DEBUG_KMEMLEAK
+ bool
+
config DEBUG_KMEMLEAK
bool "Kernel memory leak detector"
- depends on DEBUG_KERNEL && EXPERIMENTAL && \
- (X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || \
- MICROBLAZE || TILE || ARM64)
-
+ depends on DEBUG_KERNEL && EXPERIMENTAL && HAVE_DEBUG_KMEMLEAK
select DEBUG_FS
select STACKTRACE if STACKTRACE_SUPPORT
select KALLSYMS

2012-10-03 16:47:37

by Catalin Marinas

[permalink] [raw]
Subject: [PATCH 1/4] Clean up the long arch list for the UID16 config option

This patch introduces HAVE_UID16 config option and selects it in
corresponding architecture Kconfig files. UID16 now only depends on
HAVE_UID16.

Signed-off-by: Catalin Marinas <[email protected]>
Cc: Russell King <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: David Howells <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Jeff Dike <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
---
arch/arm/Kconfig | 1 +
arch/arm64/Kconfig | 1 +
arch/blackfin/Kconfig | 1 +
arch/cris/Kconfig | 1 +
arch/frv/Kconfig | 1 +
arch/h8300/Kconfig | 1 +
arch/m68k/Kconfig | 1 +
arch/s390/Kconfig | 1 +
arch/sh/Kconfig | 1 +
arch/sparc/Kconfig | 2 ++
arch/um/Kconfig.common | 1 +
arch/x86/Kconfig | 2 ++
init/Kconfig | 6 ++++--
13 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7bab17e..63ff281 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -49,6 +49,7 @@ config ARM
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN
+ select HAVE_UID16
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 767ba56..e61acae 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -193,6 +193,7 @@ config COMPAT
bool "Kernel support for 32-bit EL0"
depends on !ARM64_64K_PAGES
select COMPAT_BINFMT_ELF
+ select HAVE_UID16
help
This option enables support for a 32-bit EL0 running under a 64-bit
kernel at EL1. AArch32-specific components such as system calls,
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index c7092e6..edf12a1 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -42,6 +42,7 @@ config BLACKFIN
select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
select GENERIC_SMP_IDLE_THREAD
select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
+ select HAVE_UID16

config GENERIC_CSUM
def_bool y
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index e922154..f3f61ad 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -47,6 +47,7 @@ config CRIS
select GENERIC_IOMAP
select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
select GENERIC_CMOS_UPDATE
+ select HAVE_UID16

config HZ
int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 971c0a1..b885519 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -10,6 +10,7 @@ config FRV
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CPU_DEVICES
select ARCH_WANT_IPC_PARSE_VERSION
+ select HAVE_UID16

config ZONE_DMA
bool
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 5e8a0d9..544ac1d 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -6,6 +6,7 @@ config H8300
select ARCH_WANT_IPC_PARSE_VERSION
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
+ select HAVE_UID16

config SYMBOL_PREFIX
string
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index b22df94..2517e4f 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -13,6 +13,7 @@ config M68K
select FPU if MMU
select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+ select HAVE_UID16

config RWSEM_GENERIC_SPINLOCK
bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index f9acddd..4de3a85 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -132,6 +132,7 @@ config S390
select GENERIC_CLOCKEVENTS
select KTIME_SCALAR if 32BIT
select HAVE_ARCH_SECCOMP_FILTER
+ select HAVE_UID16 if 32BIT

config SCHED_OMIT_FRAME_POINTER
def_bool y
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 36f5141..fa6e2f1 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -35,6 +35,7 @@ config SUPERH
select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
+ select HAVE_UID16
help
The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 67f1f6f..931eaed 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -42,6 +42,7 @@ config SPARC32
def_bool !64BIT
select GENERIC_ATOMIC64
select CLZ_TAB
+ select HAVE_UID16

config SPARC64
def_bool 64BIT
@@ -572,6 +573,7 @@ config COMPAT
default y
select COMPAT_BINFMT_ELF
select ARCH_WANT_OLD_COMPAT_IPC
+ select HAVE_UID16

config SYSVIPC_COMPAT
bool
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index cb837c2..3783413 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -11,6 +11,7 @@ config UML
select GENERIC_CPU_DEVICES
select GENERIC_IO
select GENERIC_CLOCKEVENTS
+ select HAVE_UID16

config MMU
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7f9a395..2e84642 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -10,6 +10,7 @@ config X86_32
def_bool y
depends on !64BIT
select CLKSRC_I8253
+ select HAVE_UID16

config X86_64
def_bool y
@@ -2173,6 +2174,7 @@ config IA32_EMULATION
bool "IA32 Emulation"
depends on X86_64
select COMPAT_BINFMT_ELF
+ select HAVE_UID16
---help---
Include code to run legacy 32-bit programs under a
64-bit kernel. You should likely turn this on, unless you're
diff --git a/init/Kconfig b/init/Kconfig
index cb003a3..f8de091 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1125,10 +1125,12 @@ menuconfig EXPERT
environments which can tolerate a "non-standard" kernel.
Only use this if you really know what you are doing.

+config HAVE_UID16
+ bool
+
config UID16
bool "Enable 16-bit UID system calls" if EXPERT
- depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) \
- || AARCH32_EMULATION
+ depends on HAVE_UID16
default y
help
This enables the legacy 16-bit UID syscall wrappers.

2012-10-03 16:48:09

by Catalin Marinas

[permalink] [raw]
Subject: [PATCH 4/4] Clean up the "#if defined(arch)" list for exception-trace sysctl entry

This patch introduces SYSCTL_EXCEPTION_TRACE config option and selects
it in the architectures requiring support for the "exception-trace"
debug_table entry in kernel/sysctl.c.

Signed-off-by: Catalin Marinas <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
---
arch/arm64/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/s390/Kconfig | 1 +
arch/sparc/Kconfig | 1 +
arch/tile/Kconfig | 1 +
arch/x86/Kconfig | 1 +
init/Kconfig | 5 +++++
kernel/sysctl.c | 3 +--
8 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a308560..7ff68c9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -28,6 +28,7 @@ config ARM64
select PERF_USE_VMALLOC
select RTC_LIB
select SPARSE_IRQ
+ select SYSCTL_EXCEPTION_TRACE
help
ARM 64-bit (AArch64) Linux support.

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 63c640d..1ab473a 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -140,6 +140,7 @@ config PPC
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select HAVE_DEBUG_KMEMLEAK
+ select SYSCTL_EXCEPTION_TRACE

config EARLY_PRINTK
bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index d3216d7..0391630 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -134,6 +134,7 @@ config S390
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_UID16 if 32BIT
select HAVE_DEBUG_KMEMLEAK
+ select SYSCTL_EXCEPTION_TRACE

config SCHED_OMIT_FRAME_POINTER
def_bool y
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 2006ddc..d427993 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -38,6 +38,7 @@ config SPARC
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select HAVE_DEBUG_BUGVERBOSE
+ select SYSCTL_EXCEPTION_TRACE

config SPARC32
def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index e38ae98..e4bb0ca 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -19,6 +19,7 @@ config TILE
select GENERIC_CLOCKEVENTS
select HAVE_DEBUG_KMEMLEAK
select HAVE_DEBUG_BUGVERBOSE
+ select SYSCTL_EXCEPTION_TRACE

# FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6995d6b..5aaa3b6 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -106,6 +106,7 @@ config X86
select HAVE_RCU_USER_QS if X86_64
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_DEBUG_KMEMLEAK
+ select SYSCTL_EXCEPTION_TRACE

config INSTRUCTION_DECODER
def_bool y
diff --git a/init/Kconfig b/init/Kconfig
index f8de091..4d13aae 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1152,6 +1152,11 @@ config SYSCTL_SYSCALL

If unsure say N here.

+config SYSCTL_EXCEPTION_TRACE
+ bool
+ help
+ Enable support for /proc/sys/debug/exception-trace.
+
config KALLSYMS
bool "Load all symbols for debugging/ksymoops" if EXPERT
default y
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 84c76a3..b0eaca7 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1543,8 +1543,7 @@ static struct ctl_table fs_table[] = {
};

static struct ctl_table debug_table[] = {
-#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || \
- defined(CONFIG_S390) || defined(CONFIG_TILE) || defined(CONFIG_ARM64)
+#ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
{
.procname = "exception-trace",
.data = &show_unhandled_signals,

2012-10-03 16:49:18

by Catalin Marinas

[permalink] [raw]
Subject: [PATCH 3/4] Clean up the long arch list for the DEBUG_BUGVERBOSE config option

This patch introduces HAVE_DEBUG_BUGVERBOSE config option and selects it
in corresponding architecture Kconfig files. Architectures that already
select GENERIC_BUG don't need to select HAVE_DEBUG_BUGVERBOSE.

Signed-off-by: Catalin Marinas <[email protected]>
Cc: David Howells <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Andrew Morton <[email protected]>
---
arch/arm64/Kconfig | 1 +
arch/frv/Kconfig | 1 +
arch/m32r/Kconfig | 1 +
arch/m68k/Kconfig | 1 +
arch/sh/Kconfig | 1 +
arch/sparc/Kconfig | 1 +
arch/tile/Kconfig | 1 +
lib/Kconfig.debug | 8 ++++----
8 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5dc9273..a308560 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -10,6 +10,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HARDIRQS_SW_RESEND
select HAVE_ARCH_TRACEHOOK
+ select HAVE_DEBUG_BUGVERBOSE
select HAVE_DEBUG_KMEMLEAK
select HAVE_DMA_API_DEBUG
select HAVE_DMA_ATTRS
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index b885519..ac99638 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -11,6 +11,7 @@ config FRV
select GENERIC_CPU_DEVICES
select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_UID16
+ select HAVE_DEBUG_BUGVERBOSE

config ZONE_DMA
bool
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 49498bb..caabdb7 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -13,6 +13,7 @@ config M32R
select GENERIC_IRQ_SHOW
select GENERIC_ATOMIC64
select ARCH_USES_GETTIMEOFFSET
+ select HAVE_DEBUG_BUGVERBOSE

config SBUS
bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 2517e4f..3b945a3 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -14,6 +14,7 @@ config M68K
select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
select HAVE_UID16
+ select HAVE_DEBUG_BUGVERBOSE

config RWSEM_GENERIC_SPINLOCK
bool
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index cb5a22e..076a834 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -37,6 +37,7 @@ config SUPERH
select GENERIC_STRNLEN_USER
select HAVE_UID16
select HAVE_DEBUG_KMEMLEAK
+ select HAVE_DEBUG_BUGVERBOSE
help
The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a69bc77b..2006ddc 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -37,6 +37,7 @@ config SPARC
select GENERIC_CLOCKEVENTS
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
+ select HAVE_DEBUG_BUGVERBOSE

config SPARC32
def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index afb3abd..e38ae98 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -18,6 +18,7 @@ config TILE
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CLOCKEVENTS
select HAVE_DEBUG_KMEMLEAK
+ select HAVE_DEBUG_BUGVERBOSE

# FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 63dfc4c..5636bfd 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -750,12 +750,12 @@ config DEBUG_HIGHMEM
This options enables addition error checking for high memory systems.
Disable for production systems.

+config HAVE_DEBUG_BUGVERBOSE
+ bool
+
config DEBUG_BUGVERBOSE
bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
- depends on BUG
- depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \
- FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 || \
- TILE || ARM64
+ depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
default y
help
Say Y here to make BUG() panics output the file name and line number

2012-10-03 18:24:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Wed, Oct 3, 2012 at 6:44 PM, Catalin Marinas <[email protected]> wrote:
> arch/m68k/Kconfig | 1 +

Acked-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2012-10-03 18:25:29

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 3/4] Clean up the long arch list for the DEBUG_BUGVERBOSE config option

On Wed, Oct 3, 2012 at 6:44 PM, Catalin Marinas <[email protected]> wrote:
> arch/m68k/Kconfig | 1 +

Acked-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2012-10-03 22:15:10

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Wed, 3 Oct 2012 17:44:23 +0100
Catalin Marinas <[email protected]> wrote:

> This patch introduces HAVE_UID16 config option and selects it in
> corresponding architecture Kconfig files. UID16 now only depends on
> HAVE_UID16.

patching file arch/arm/Kconfig
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/Kconfig.rej
patching file arch/arm64/Kconfig
patching file arch/blackfin/Kconfig
Hunk #1 FAILED at 42.
1 out of 1 hunk FAILED -- saving rejects to file arch/blackfin/Kconfig.rej
patching file arch/cris/Kconfig
Hunk #1 FAILED at 47.
1 out of 1 hunk FAILED -- saving rejects to file arch/cris/Kconfig.rej
patching file arch/frv/Kconfig
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file arch/frv/Kconfig.rej
patching file arch/h8300/Kconfig
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file arch/h8300/Kconfig.rej
patching file arch/m68k/Kconfig
Hunk #1 FAILED at 13.
1 out of 1 hunk FAILED -- saving rejects to file arch/m68k/Kconfig.rej
patching file arch/s390/Kconfig
Hunk #1 FAILED at 132.
1 out of 1 hunk FAILED -- saving rejects to file arch/s390/Kconfig.rej
patching file arch/sh/Kconfig
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file arch/sh/Kconfig.rej


This is a pet peeve of mine. Any time there's a long list of items
(header file inclusions, kconfig entries, array initalisers, etc) and
someone wants to add a new item, they *always* go and stick it at the
end of the list.

Which is exactly where everyone else applies their modifications. The
whole thing is carefully set up to maximise the number of conflicts.

Guys, don't do this. Either put the new item into a randomly-chosen
position or, probably better, alphanumerically sort the list.


For this reason it looks like approximately 0% of the patchset will
apply, sorry.

2012-10-04 10:03:40

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Wed, Oct 03, 2012 at 11:15:05PM +0100, Andrew Morton wrote:
> On Wed, 3 Oct 2012 17:44:23 +0100
> Catalin Marinas <[email protected]> wrote:
>
> > This patch introduces HAVE_UID16 config option and selects it in
> > corresponding architecture Kconfig files. UID16 now only depends on
> > HAVE_UID16.
>
> patching file arch/arm/Kconfig
> Hunk #1 FAILED at 49.
...
> This is a pet peeve of mine. Any time there's a long list of items
> (header file inclusions, kconfig entries, array initalisers, etc) and
> someone wants to add a new item, they *always* go and stick it at the
> end of the list.
>
> Which is exactly where everyone else applies their modifications. The
> whole thing is carefully set up to maximise the number of conflicts.
>
> Guys, don't do this. Either put the new item into a randomly-chosen
> position or, probably better, alphanumerically sort the list.

I will repost a v2 with randomly chosen position. Sorting is better but
it would cause even more conflicts at this stage. It would be suitable
for a later -rc clean-up though.

--
Catalin

2012-10-04 19:42:01

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Wed, Oct 03, 2012 at 03:15:05PM -0700, Andrew Morton wrote:
> Guys, don't do this. Either put the new item into a randomly-chosen
> position or, probably better, alphanumerically sort the list.

I've been telling people to alphanumerically sort Kconfig select
options for some time, but as normal, no one's listening.

2012-10-04 19:45:39

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Thu, Oct 4, 2012 at 9:41 PM, Russell King - ARM Linux
<[email protected]> wrote:
> On Wed, Oct 03, 2012 at 03:15:05PM -0700, Andrew Morton wrote:
>> Guys, don't do this. Either put the new item into a randomly-chosen
>> position or, probably better, alphanumerically sort the list.
>
> I've been telling people to alphanumerically sort Kconfig select
> options for some time, but as normal, no one's listening.

Anyone who cares to sort the existing ones "at the end of the merge window",
and teaches checkpatch to enforce it for new ones?

The next step is #include order...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2012-10-04 19:47:11

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Thu, Oct 04, 2012 at 09:45:35PM +0200, Geert Uytterhoeven wrote:
> On Thu, Oct 4, 2012 at 9:41 PM, Russell King - ARM Linux
> <[email protected]> wrote:
> > On Wed, Oct 03, 2012 at 03:15:05PM -0700, Andrew Morton wrote:
> >> Guys, don't do this. Either put the new item into a randomly-chosen
> >> position or, probably better, alphanumerically sort the list.
> >
> > I've been telling people to alphanumerically sort Kconfig select
> > options for some time, but as normal, no one's listening.
>
> Anyone who cares to sort the existing ones "at the end of the merge window",
> and teaches checkpatch to enforce it for new ones?

Well, I'll certainly do that for ARM... but how long it'll stay like
that will be very hit and miss...

2012-10-04 20:20:11

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH 1/4] Clean up the long arch list for the UID16 config option

On Thu, Oct 04, 2012 at 08:41:31PM +0100, Russell King - ARM Linux wrote:
> On Wed, Oct 03, 2012 at 03:15:05PM -0700, Andrew Morton wrote:
> > Guys, don't do this. Either put the new item into a randomly-chosen
> > position or, probably better, alphanumerically sort the list.
>
> I've been telling people to alphanumerically sort Kconfig select
> options for some time, but as normal, no one's listening.

CONFIG_ARM64 is sorted ;)

--
Catalin