diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-18 16:56:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-18 16:56:51 -0400 |
commit | 005882e53d62f25dae10351a8d3f13326051e8f5 (patch) | |
tree | 4c482d5b830877cbce99d4d9bca4802946e7471a | |
parent | 40d9018eb738f724dc9c27eec88c78cc488e0af0 (diff) | |
parent | 544f8f935863c5a9ca3e34306ea3316095e7b7bf (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
"Two Sparc bug fixes from Daniel Jordan and Nitin Gupta"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc64: Fix hugepage page table free
sparc64: Use LOCKDEP_SMALL, not PROVE_LOCKING_SMALL
-rw-r--r-- | arch/sparc/Kconfig | 2 | ||||
-rw-r--r-- | arch/sparc/mm/hugetlbpage.c | 16 | ||||
-rw-r--r-- | kernel/locking/lockdep_internals.h | 6 | ||||
-rw-r--r-- | lib/Kconfig.debug | 6 |
4 files changed, 23 insertions, 7 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 68ac5c7cd982..a59deaef21e5 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -43,7 +43,7 @@ config SPARC | |||
43 | select ARCH_HAS_SG_CHAIN | 43 | select ARCH_HAS_SG_CHAIN |
44 | select CPU_NO_EFFICIENT_FFS | 44 | select CPU_NO_EFFICIENT_FFS |
45 | select HAVE_ARCH_HARDENED_USERCOPY | 45 | select HAVE_ARCH_HARDENED_USERCOPY |
46 | select PROVE_LOCKING_SMALL if PROVE_LOCKING | 46 | select LOCKDEP_SMALL if LOCKDEP |
47 | select ARCH_WANT_RELAX_ORDER | 47 | select ARCH_WANT_RELAX_ORDER |
48 | 48 | ||
49 | config SPARC32 | 49 | config SPARC32 |
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index ee5273ad918d..7c29d38e6b99 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -461,6 +461,22 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb, | |||
461 | pgd_t *pgd; | 461 | pgd_t *pgd; |
462 | unsigned long next; | 462 | unsigned long next; |
463 | 463 | ||
464 | addr &= PMD_MASK; | ||
465 | if (addr < floor) { | ||
466 | addr += PMD_SIZE; | ||
467 | if (!addr) | ||
468 | return; | ||
469 | } | ||
470 | if (ceiling) { | ||
471 | ceiling &= PMD_MASK; | ||
472 | if (!ceiling) | ||
473 | return; | ||
474 | } | ||
475 | if (end - 1 > ceiling - 1) | ||
476 | end -= PMD_SIZE; | ||
477 | if (addr > end - 1) | ||
478 | return; | ||
479 | |||
464 | pgd = pgd_offset(tlb->mm, addr); | 480 | pgd = pgd_offset(tlb->mm, addr); |
465 | do { | 481 | do { |
466 | next = pgd_addr_end(addr, end); | 482 | next = pgd_addr_end(addr, end); |
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h index c2b88490d857..c08fbd2f5ba9 100644 --- a/kernel/locking/lockdep_internals.h +++ b/kernel/locking/lockdep_internals.h | |||
@@ -46,13 +46,13 @@ enum { | |||
46 | (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ) | 46 | (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ) |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * CONFIG_PROVE_LOCKING_SMALL is defined for sparc. Sparc requires .text, | 49 | * CONFIG_LOCKDEP_SMALL is defined for sparc. Sparc requires .text, |
50 | * .data and .bss to fit in required 32MB limit for the kernel. With | 50 | * .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. |
52 | * So, reduce the static allocations for lockdeps related structures so that | 52 | * So, reduce the static allocations for lockdeps related structures so that |
53 | * everything fits in current required size limit. | 53 | * everything fits in current required size limit. |
54 | */ | 54 | */ |
55 | #ifdef CONFIG_PROVE_LOCKING_SMALL | 55 | #ifdef CONFIG_LOCKDEP_SMALL |
56 | /* | 56 | /* |
57 | * MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies | 57 | * MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies |
58 | * we track. | 58 | * we track. |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 97d62c2da6c2..fa16c0f82d6e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -1103,9 +1103,6 @@ config PROVE_LOCKING | |||
1103 | 1103 | ||
1104 | For more details, see Documentation/locking/lockdep-design.txt. | 1104 | For more details, see Documentation/locking/lockdep-design.txt. |
1105 | 1105 | ||
1106 | config PROVE_LOCKING_SMALL | ||
1107 | bool | ||
1108 | |||
1109 | config LOCKDEP | 1106 | config LOCKDEP |
1110 | bool | 1107 | bool |
1111 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 1108 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
@@ -1114,6 +1111,9 @@ config LOCKDEP | |||
1114 | select KALLSYMS | 1111 | select KALLSYMS |
1115 | select KALLSYMS_ALL | 1112 | select KALLSYMS_ALL |
1116 | 1113 | ||
1114 | config LOCKDEP_SMALL | ||
1115 | bool | ||
1116 | |||
1117 | config LOCK_STAT | 1117 | config LOCK_STAT |
1118 | bool "Lock usage statistics" | 1118 | bool "Lock usage statistics" |
1119 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 1119 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |