Skip to content

Commit 395102d

Browse files
danieljordan10davem330
authored andcommitted
sparc64: Use LOCKDEP_SMALL, not PROVE_LOCKING_SMALL
CONFIG_PROVE_LOCKING_SMALL shrinks the memory usage of lockdep so the kernel text, data, and bss fit in the required 32MB limit, but this option is not set for every config that enables lockdep. A 4.10 kernel fails to boot with the console output Kernel: Using 8 locked TLB entries for main kernel image. hypervisor_tlb_lock[2000000:0:8000000071c007c3:1]: errors with f Program terminated with these config options CONFIG_LOCKDEP=y CONFIG_LOCK_STAT=y CONFIG_PROVE_LOCKING=n To fix, rename CONFIG_PROVE_LOCKING_SMALL to CONFIG_LOCKDEP_SMALL, and enable this option with CONFIG_LOCKDEP=y so we get the reduced memory usage every time lockdep is turned on. Tested that CONFIG_LOCKDEP_SMALL is set to 'y' if and only if CONFIG_LOCKDEP is set to 'y'. When other lockdep-related config options that select CONFIG_LOCKDEP are enabled (e.g. CONFIG_LOCK_STAT or CONFIG_PROVE_LOCKING), verified that CONFIG_LOCKDEP_SMALL is also enabled. Fixes: e6b5f1b ("config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc") Signed-off-by: Daniel Jordan <[email protected]> Reviewed-by: Babu Moger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fb5e215 commit 395102d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arch/sparc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ config SPARC
4343
select ARCH_HAS_SG_CHAIN
4444
select CPU_NO_EFFICIENT_FFS
4545
select HAVE_ARCH_HARDENED_USERCOPY
46-
select PROVE_LOCKING_SMALL if PROVE_LOCKING
46+
select LOCKDEP_SMALL if LOCKDEP
4747
select ARCH_WANT_RELAX_ORDER
4848

4949
config SPARC32

kernel/locking/lockdep_internals.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ enum {
4646
(LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ)
4747

4848
/*
49-
* CONFIG_PROVE_LOCKING_SMALL is defined for sparc. Sparc requires .text,
49+
* CONFIG_LOCKDEP_SMALL is defined for sparc. Sparc requires .text,
5050
* .data and .bss to fit in required 32MB limit for the kernel. With
51-
* PROVE_LOCKING we could go over this limit and cause system boot-up problems.
51+
* CONFIG_LOCKDEP we could go over this limit and cause system boot-up problems.
5252
* So, reduce the static allocations for lockdeps related structures so that
5353
* everything fits in current required size limit.
5454
*/
55-
#ifdef CONFIG_PROVE_LOCKING_SMALL
55+
#ifdef CONFIG_LOCKDEP_SMALL
5656
/*
5757
* MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies
5858
* we track.

lib/Kconfig.debug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,9 +1103,6 @@ config PROVE_LOCKING
11031103

11041104
For more details, see Documentation/locking/lockdep-design.txt.
11051105

1106-
config PROVE_LOCKING_SMALL
1107-
bool
1108-
11091106
config LOCKDEP
11101107
bool
11111108
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
@@ -1114,6 +1111,9 @@ config LOCKDEP
11141111
select KALLSYMS
11151112
select KALLSYMS_ALL
11161113

1114+
config LOCKDEP_SMALL
1115+
bool
1116+
11171117
config LOCK_STAT
11181118
bool "Lock usage statistics"
11191119
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT

0 commit comments

Comments
 (0)